84% gp-display-all-categories

Code Review | GP Display All Category

WordPress plugin GP Display All Category scored84%from 54 tests.

About plugin

  • Plugin page: gp-display-all-ca...
  • 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 /951 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by GP Display All Category
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.54 ▲0.51
Dashboard /wp-admin3.33 ▲0.0250.52 ▼1.95
Posts /wp-admin/edit.php3.38 ▲0.0250.28 ▼5.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.64 ▼2.85
Media Library /wp-admin/upload.php3.25 ▲0.0237.77 ▲0.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_gp_all_category_widget
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by GP Display All Category
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.422.04 ▼0.8143.65 ▲1.93
Dashboard /wp-admin2,195 ▲185.50 ▼0.1692.15 ▼9.6441.84 ▲2.48
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0533.72 ▼9.9538.76 ▼2.99
Add New Post /wp-admin/post-new.php1,526 ▼223.62 ▲0.75685.19 ▲1.4553.79 ▼1.65
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.0496.89 ▼10.5749.43 ▼0.88

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_gp_all_category_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-display-all-categories/gp-display-all-category-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: widget, category, custom widget

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

The main PHP file in "GP Display All Category" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gp-display-all-categories.php" instead of "gp-display-all-category-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected88 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101088

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin