84% simple-classifieds

Code Review | Simple Classifieds

WordPress plugin Simple Classifieds scored84%from 54 tests.

About plugin

  • Plugin page: simple-classifieds
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 8, 2019
  • Latest release: Jul 31, 2023
  • Number of updates: 12
  • Update frequency: every 395.8 days
  • Top authors: iworks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,501 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Simple Classifieds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5940.19 ▲1.33
Dashboard /wp-admin3.92 ▲0.5748.41 ▼16.58
Posts /wp-admin/edit.php3.96 ▲0.6146.97 ▼0.56
Add New Post /wp-admin/post-new.php6.55 ▲0.6691.46 ▼4.10
Media Library /wp-admin/upload.php3.77 ▲0.5540.92 ▲2.44
Add New /wp-admin/post-new.php?post_type=iworks_classified6.5487.02
Categories /wp-admin/edit-tags.php?taxonomy=classified_category&post_type=iworks_classified3.7736.15
Configuration /wp-admin/edit.php?post_type=iworks_classified&page=iworks_classifieds_index3.7638.25
Classifieds /wp-admin/edit.php?post_type=iworks_classified3.8838.00

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 21 new options
New WordPress options
iworks_classifieds_boad_add_social_media
iworks_classifieds_general_allow_to_add
widget_theysaidso_widget
iworks_classifieds_category_show
iworks_classifieds_boat_auto_add_feature_image
iworks_classifieds_listing_show_social_media
theysaidso_admin_options
iworks_classifieds_cache_stamp
iworks_classifieds_listing_show_boats_table
iworks_classifieds_boat_add_extra_data
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Classifieds
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12113.23 ▼1.034.73 ▲3.0340.99 ▼0.49
Dashboard /wp-admin2,242 ▲535.81 ▲0.9094.47 ▼25.4735.90 ▼7.60
Posts /wp-admin/edit.php2,127 ▲382.05 ▲0.0634.02 ▼4.3832.15 ▼2.39
Add New Post /wp-admin/post-new.php1,543 ▲1017.73 ▼5.41649.76 ▼35.9753.63 ▼5.51
Media Library /wp-admin/upload.php1,423 ▲324.23 ▲0.0297.51 ▼6.0041.81 ▼3.32
Add New /wp-admin/post-new.php?post_type=iworks_classified6,31719.45815.5234.98
Categories /wp-admin/edit-tags.php?taxonomy=classified_category&post_type=iworks_classified1,3002.1426.0727.01
Configuration /wp-admin/edit.php?post_type=iworks_classified&page=iworks_classifieds_index1,4053.0260.4236.26
Classifieds /wp-admin/edit.php?post_type=iworks_classified1,1101.9329.8829.82

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
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/simple-classifieds/vendor/iworks/rate/rate.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-classifieds/assets/templates/contact.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/simple-classifieds/assets/templates/location.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/simple-classifieds/assets/templates/category.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_avatar() in wp-content/plugins/simple-classifieds/assets/templates/avatar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/simple-classifieds/assets/templates/price.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: classifieds

simple-classifieds/simple-classifieds.php Passed 13 tests

Analyzing the main PHP file in "Simple Classifieds" version 1.0.1
32 characters long description:
Realy simple classifieds plugin.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,851 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP132507492,832
JavaScript65892415
CSS62211290
PO File1110123261
SVG21153

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 186)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity87.33
▷ Minimum class complexity8.00
▷ Maximum class complexity379.00
Average method complexity4.95
▷ Minimum method complexity1.00
▷ Maximum method complexity186.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods131
▷ Static methods10.76%
▷ Public methods8867.18%
▷ Protected methods1612.21%
▷ Private methods2720.61%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin