72% onlist

Code Review | OnList

WordPress plugin OnList scored 72% from 54 tests.

About plugin

  • Plugin page: onlist
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Oct 3, 2017
  • Latest release: Aug 10, 2021
  • Number of updates: 40
  • Update frequency: every 35.2 days
  • Top authors: tradesouthwest@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,286 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼2.91ms] Passed 4 tests

An overview of server-side resources used by OnList
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.44 ▼8.18
Dashboard /wp-admin3.50 ▲0.2056.11 ▲8.15
Posts /wp-admin/edit.php3.62 ▲0.2651.00 ▲2.51
Add New Post /wp-admin/post-new.php6.09 ▲0.2094.25 ▼8.88
Media Library /wp-admin/upload.php3.43 ▲0.2038.71 ▲2.92
Listings Categories /wp-admin/edit-tags.php?taxonomy=onlist-taxonomy&post_type=onlist_post3.4235.63
OnList Listings /wp-admin/edit.php?post_type=onlist_post3.4748.75
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=onlist_post3.4236.87
Add New /wp-admin/post-new.php?post_type=onlist_post3.5649.45

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_onlist_widget
widget_recent-comments
can_compress_scripts
onlist_date_plugin_activated
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by OnList
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲12313.63 ▼1.021.75 ▼0.0940.92 ▼2.19
Dashboard /wp-admin2,262 ▲745.85 ▲0.78102.81 ▼3.4343.99 ▼1.91
Posts /wp-admin/edit.php2,121 ▲322.02 ▲0.0237.26 ▲0.0731.76 ▲0.31
Add New Post /wp-admin/post-new.php1,572 ▲3823.00 ▼0.09579.21 ▼65.6547.54 ▼20.92
Media Library /wp-admin/upload.php1,441 ▲564.23 ▲0.0298.65 ▼5.9241.63 ▼2.11
Listings Categories /wp-admin/edit-tags.php?taxonomy=onlist-taxonomy&post_type=onlist_post1,3152.1427.9928.83
OnList Listings /wp-admin/edit.php?post_type=onlist_post1,1652.0038.1634.52
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=onlist_post1,3602.1429.4232.98
Add New /wp-admin/post-new.php?post_type=onlist_post2,7717.94179.4773.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_onlist_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=onlist_post
    • > Notice in wp-content/plugins/onlist/admin/onlist-editor-page.php+32
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/onlist/admin/onlist-plugin-admin.php
    • > /wp-content/plugins/onlist/inc/onlist-plugin-post-type.php
    • > /wp-content/plugins/onlist/public/onlist-public-options.php
    • > /wp-content/plugins/onlist/inc/templates/comments.php
    • > /wp-content/plugins/onlist/inc/onlist-manage-terms.php
    • > /wp-content/plugins/onlist/inc/onlist-plugin-post-taxo.php
    • > /wp-content/plugins/onlist/admin/onlist-editor-page.php
    • > /wp-content/plugins/onlist/admin/onlist-admin-forms.php
    • > /wp-content/plugins/onlist/admin/onlist-public-settings.php
    • > /wp-content/plugins/onlist/inc/templates/onlist-global-options.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/onlist/inc/templates/content-single.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/onlist/inc/Onlist_Widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/onlist/inc/templates/single-onlist_post.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/onlist/inc/templates/archive-onlist_post.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/onlist/inc/templates/content-category.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

onlist/onlist.php 85% from 13 tests

The main PHP file in "OnList" ver. 1.0.7 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.8" instead of "4.6")
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6" instead of "5.4")

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
No dangerous file extensions were detected1,904 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP192152881,422
CSS281482

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions54100.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 are no PNG files in this plugin