79% wp-current-subcategories

Code Review | WP Current Subcategories

WordPress plugin WP Current Subcategories scored 79% from 54 tests.

About plugin

  • Plugin page: wp-current-subcat...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 30, 2019
  • Latest release: Oct 1, 2019
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: francescosganga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 542 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.78ms] Passed 4 tests

An overview of server-side resources used by WP Current Subcategories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.49 ▼5.62
Dashboard /wp-admin3.32 ▲0.0245.58 ▼0.87
Posts /wp-admin/edit.php3.37 ▲0.0153.09 ▲6.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.40 ▼4.78
Media Library /wp-admin/upload.php3.24 ▲0.0134.68 ▲0.17
About /wp-admin/admin.php?page=wpsubcategories-option-about3.22290.57
WP Subcategories /wp-admin/admin.php?page=wpsubcategories-options3.2128.18

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_wpsubcategories_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Current Subcategories
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.24 ▼1.341.70 ▼0.2238.09 ▼13.33
Dashboard /wp-admin2,233 ▲424.85 ▼0.08109.46 ▲3.1244.41 ▼2.42
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0141.50 ▲4.9537.13 ▲3.22
Add New Post /wp-admin/post-new.php1,555 ▲2123.27 ▲0.20610.49 ▼69.8552.76 ▼7.14
Media Library /wp-admin/upload.php1,418 ▲304.19 ▲0.0197.19 ▼8.5840.88 ▼3.23
About /wp-admin/admin.php?page=wpsubcategories-option-about8062.0225.5427.87
WP Subcategories /wp-admin/admin.php?page=wpsubcategories-options8062.1823.4425.84

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_wpsubcategories_widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-current-subcategories/wp-current-subcategories.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wpsubcategories-option-about
    • > Network (severe)
    site/templates/styles/main.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: widget, subcategories, current

wp-current-subcategories/wp-current-subcategories.php Passed 13 tests

"WP Current Subcategories" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
Add a widget to show current subcategories

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114891

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected