72% classified

Code Review | WP Classified

WordPress plugin WP Classified scored72%from 54 tests.

About plugin

  • Plugin page: classified
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2016
  • Latest release: Jun 26, 2023
  • Number of updates: 10
  • Update frequency: every 263.1 days
  • Top authors: WEN Solutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /9,618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▲0.93ms] Passed 4 tests

This is a short check of server-side resources used by WP Classified
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7045.56 ▲5.44
Dashboard /wp-admin3.88 ▲0.5749.11 ▼1.90
Posts /wp-admin/edit.php3.93 ▲0.5751.31 ▲5.02
Add New Post /wp-admin/post-new.php6.48 ▲0.5997.74 ▼4.83
Media Library /wp-admin/upload.php3.74 ▲0.5144.62 ▲12.71
Add New Ads /wp-admin/post-new.php?post_type=wp-classified-ads3.9451.90
Ads Type /wp-admin/edit-tags.php?taxonomy=classified-ads-type&post_type=wp-classified-ads3.7338.29
All Ad Items /wp-admin/edit.php?post_type=wp-classified-ads3.9443.91

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 73 new files
Database: no new tables, 9 new options
New WordPress options
wp_classified_flush_permalink
widget_recent-comments
db_upgraded
wp_classified_user_dashboard_page_id
theysaidso_admin_options
wp_setup_page_redirect
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Classified
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,491 ▲73423.24 ▲9.00218.85 ▲216.6181.22 ▲27.19
Dashboard /wp-admin2,237 ▲465.76 ▲0.7394.86 ▼11.9440.91 ▼4.26
Posts /wp-admin/edit.php2,120 ▲342.01 ▼0.0439.39 ▲3.4335.73 ▼2.76
Add New Post /wp-admin/post-new.php1,703 ▲17024.60 ▲1.26585.33 ▼23.6335.52 ▼13.31
Media Library /wp-admin/upload.php1,422 ▲344.14 ▼0.0695.72 ▼7.7142.21 ▼2.24
Add New Ads /wp-admin/post-new.php?post_type=wp-classified-ads1,91116.81286.4184.18
Ads Type /wp-admin/edit-tags.php?taxonomy=classified-ads-type&post_type=wp-classified-ads1,2902.1427.8029.76
All Ad Items /wp-admin/edit.php?post_type=wp-classified-ads1,57613.17119.9427.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • wp_classified_user_dashboard_page_id
    • db_upgraded
    • widget_recent-posts
    • wp_setup_page_redirect
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wp_classified_flush_permalink

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/classified/wp-classified-ads.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wp_Classified_Ads\\add_action() in wp-content/plugins/classified/inc/admin/classified-ads-post-type.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wp_Classified_Ads\\add_filter() in wp-content/plugins/classified/inc/hook_list/single_ads_hook.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/classified/inc/templates/classified-ads-archive.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/classified/inc/templates/classified-ads-single-archive.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wp_Classified_Ads\\add_shortcode() in wp-content/plugins/classified/inc/shortcode/user_dashboard.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wp-classified-ads
    • > Network (severe)
    wp-content/plugins/classified/app/bundle/js/font-awesome.min.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: classifieds script, classified wp, classifieds, wp classified, classified...

classified/wp-classified-ads.php 92% from 13 tests

The main file in "WP Classified" v. 3.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("classified.php" instead of "wp-classified-ads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,271 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP341458062,119
JavaScript82731,0801,262
CSS114613836
SVG10054

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity12.79
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes13.45%
Methods83
▷ Static methods5161.45%
▷ Public methods8298.80%
▷ Protected methods00.00%
▷ Private methods11.20%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin