78% classified-ads

Code Review | Classified Ads

WordPress plugin Classified Ads scored78%from 54 tests.

About plugin

  • Plugin page: classified-ads
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Jun 18, 2023
  • Latest release: Oct 17, 2023
  • Number of updates: 6
  • Update frequency: every 20.5 days
  • Top authors: listingthemes (83.33%)sanwinter (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /3,153 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.58MB] [CPU: ▼4.85ms] Passed 4 tests

An overview of server-side resources used by Classified Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5337.52 ▼4.78
Dashboard /wp-admin3.92 ▲0.6146.94 ▲0.25
Posts /wp-admin/edit.php3.95 ▲0.6045.78 ▲1.61
Add New Post /wp-admin/post-new.php6.57 ▲0.6876.25 ▼14.58
Media Library /wp-admin/upload.php3.81 ▲0.5833.96 ▼0.29
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.9233.67
Classified Ads Import /wp-admin/tools.php?page=classified_ads_import3.7833.28

Server storage [IO: ▲10.58MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 154 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Classified Ads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.58 ▼1.057.63 ▲5.9439.95 ▼3.22
Dashboard /wp-admin2,239 ▲595.52 ▼0.3383.46 ▼15.4439.83 ▼4.32
Posts /wp-admin/edit.php2,159 ▲562.07 ▲0.0934.68 ▼2.2140.27 ▲4.19
Add New Post /wp-admin/post-new.php1,571 ▲4323.15 ▲0.19644.41 ▼5.6553.91 ▼9.66
Media Library /wp-admin/upload.php1,452 ▲494.24 ▲0.1395.34 ▼4.0444.48 ▲0.61
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0812.0523.5729.45
Classified Ads Import /wp-admin/tools.php?page=classified_ads_import9682.0724.6832.46

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/classified-ads/admin/partials/classified-ads-admin-display.php
    • > /wp-content/plugins/classified-ads/public/partials/classified-ads-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/classified-ads/tgm-pa/class-tgm-plugin-activation.php:2113
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/classified-ads/tgm-pa/class-tgm-plugin-activation.php:2113

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Classified Ads Directory Categories Element), #2 (Classified Ads Directory Tree Element), #3 (Classified Ads Directory Import Tool)
The official readme.txt is a good inspiration

classified-ads/classified-ads.php Passed 13 tests

"Classified Ads" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
75 characters long description:
Build your Classified Ads Directory Portal based on Wp Directory Kit Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin21,235 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
XML249128,544
PO File171,4491,9934,842
JSON1004,566
PHP177132,2402,380
Markdown41840776
CSS22311121
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity23.93
▷ Minimum class complexity1.00
▷ Maximum class complexity208.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods139
▷ Static methods75.04%
▷ Public methods10978.42%
▷ Protected methods2316.55%
▷ Private methods75.04%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
demo-data/images/laptop-category-icon-1.png0.53KB0.57KB0.00%
demo-data/images/mobile-category-icon-1.png0.46KB0.48KB0.00%
demo-data/images/fashion-category-icon-1.png3.00KB3.09KB0.00%
demo-data/images/industrial-vehicle-category-icon-1.png2.55KB2.64KB0.00%
demo-data/images/jobs-category-icon-1.png3.55KB3.74KB0.00%