68% local-classifieds

Code Review | Local Classifieds

WordPress plugin Local Classifieds scored68%from 54 tests.

About plugin

  • Plugin page: local-classifieds
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Jan 10, 2017
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: osoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,473 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.15MB] [CPU: ▼53.57ms] Passed 4 tests

Analyzing server-side resources used by Local Classifieds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6216.52 ▼26.55
Dashboard /wp-admin2.88 ▼0.4721.34 ▼50.70
Posts /wp-admin/edit.php2.88 ▼0.4819.01 ▼35.79
Add New Post /wp-admin/post-new.php2.88 ▼3.0119.11 ▼101.25
Media Library /wp-admin/upload.php2.88 ▼0.3521.60 ▼16.64
Classifieds List /wp-admin/edit.php?post_type=classified2.8817.01
Settings /wp-admin/edit.php?post_type=classified&page=LCGRW_PAGE2.8816.77
Post new ad /wp-admin/post-new.php?post_type=classified2.8818.17

Server storage [IO: ▲0.09MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
LCGRW_add_page_id
db_upgraded
can_compress_scripts
widget_theysaidso_widget
LCGRW_list_page_id

Browser metrics Passed 4 tests

Checking browser requirements for Local Classifieds
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲13513.50 ▼0.7810.35 ▲8.0539.64 ▼5.25
Dashboard /wp-admin2,210 ▲305.52 ▼0.1486.11 ▼12.6185.73 ▲41.08
Posts /wp-admin/edit.php2,130 ▲272.12 ▲0.0840.66 ▼1.2934.80 ▼3.22
Add New Post /wp-admin/post-new.php1,568 ▲4023.39 ▼0.04642.88 ▼32.04157.84 ▲100.86
Media Library /wp-admin/upload.php1,433 ▲334.19 ▼0.0199.23 ▼12.4074.59 ▲26.66
Classifieds List /wp-admin/edit.php?post_type=classified1,0941.9932.0431.73
Settings /wp-admin/edit.php?post_type=classified&page=LCGRW_PAGE8462.0024.0327.98
Post new ad /wp-admin/post-new.php?post_type=classified2,5638.10177.95112.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • LCGRW_list_page_id
    • widget_recent-comments
    • LCGRW_add_page_id
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=classified
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
    • > GET request to /wp-admin/edit.php?post_type=classified&page=LCGRW_PAGE
    • > Notice in wp-content/plugins/local-classifieds/local-classifieds.php+410
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/local-classifieds/includes/templates/add.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/local-classifieds/local-classifieds.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/local-classifieds/includes/templates/single.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/local-classifieds/includes/templates/list.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === local-classifieds === )
You can look at the official readme.txt

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

The primary PHP file in "Local Classifieds" version 1.0 is used by WordPress to initiate all plugin functionality
65 characters long description:
Classifieds system for your LOCAL needs, works with any template.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin379 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4129125377
CSS1041
JavaScript1051

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/class_icon.png0.76KB0.68KB▼ 10.03%