73% plugin-categories

Code Review | Plugin Categories

WordPress plugin Plugin Categories scored73%from 54 tests.

About plugin

  • Plugin page: plugin-categories
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: Jul 1, 2014
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: tormorten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,248 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.50ms] Passed 4 tests

An overview of server-side resources used by Plugin Categories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.25 ▲1.12
Dashboard /wp-admin3.39 ▲0.0549.40 ▼19.32
Posts /wp-admin/edit.php3.51 ▲0.1553.47 ▲3.61
Add New Post /wp-admin/post-new.php5.97 ▲0.0997.47 ▼7.90
Media Library /wp-admin/upload.php3.32 ▲0.0939.40 ▲0.09
Categories /wp-admin/edit-tags.php?taxonomy=plugin_category3.1226.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Categories
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.12 ▼1.264.61 ▲2.8344.77 ▲3.21
Dashboard /wp-admin2,210 ▲194.86 ▼0.21108.07 ▲4.7142.11 ▼4.77
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0439.95 ▲2.5135.67 ▲3.15
Add New Post /wp-admin/post-new.php1,545 ▲2618.26 ▼4.82627.68 ▼63.5253.78 ▲5.16
Media Library /wp-admin/upload.php1,386 ▼24.20 ▲0.1195.71 ▼18.3543.27 ▲0.93
Categories /wp-admin/edit-tags.php?taxonomy=plugin_category280.440.063.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/plugin-categories/plugin-categories.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin_Categories' not found in wp-content/plugins/plugin-categories/classes/views.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/edit-tags.php?taxonomy=plugin_category
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=plugin_category - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (The plugin list with categories.)
Please take inspiration from this readme.txt

plugin-categories/plugin-categories.php Passed 13 tests

The entry point to "Plugin Categories" version 0.2.2 is a PHP file that has certain tags in its header comment area
60 characters long description:
Categorize your WordPress Plugins just like you would posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected361 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3247153349
CSS1306
JavaScript1506

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.35
Average class complexity19.50
▷ Minimum class complexity5.00
▷ Maximum class complexity34.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.62KB12.67KB▼ 67.19%