84% gp-display-child-categories

Code Review | GP Display Child Categories

WordPress plugin GP Display Child Categories scored84%from 54 tests.

About plugin

  • Plugin page: gp-display-child-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2016
  • Latest release: Feb 4, 2016
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: giangmd93 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,008 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.65ms] Passed 4 tests

This is a short check of server-side resources used by GP Display Child Categories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.36 ▼7.02
Dashboard /wp-admin3.33 ▲0.0248.41 ▲0.39
Posts /wp-admin/edit.php3.38 ▲0.0248.53 ▼8.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.79 ▼18.58
Media Library /wp-admin/upload.php3.25 ▲0.0240.45 ▼0.37

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_gp_child_category_widget
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for GP Display Child Categories
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.141.61 ▼0.6738.95 ▼6.42
Dashboard /wp-admin2,195 ▲215.55 ▼0.0389.59 ▼4.5839.77 ▼4.53
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0136.49 ▼8.0138.76 ▼0.76
Add New Post /wp-admin/post-new.php1,526 ▼023.68 ▲0.15701.47 ▼5.4951.74 ▼4.13
Media Library /wp-admin/upload.php1,400 ▼34.24 ▲0.0799.35 ▼4.8744.23 ▼3.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_gp_child_category_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-display-child-categories/gp-display-child-category-widget.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: category, widget, child categories, custom widget

gp-display-child-categories/gp-display-child-category-widget.php 92% from 13 tests

"GP Display Child Categories" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gp-display-child-categories.php" instead of "gp-display-child-category-widget.php")

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
Success! There were no dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181067

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions1
▷ Named functions1100.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