84% contextual-category-widget

Code Review | Contextual Category Widget

WordPress plugin Contextual Category Widget scored84%from 54 tests.

About plugin

  • Plugin page: contextual-catego...
  • Plugin version: 0.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 6, 2019
  • Latest release: Sep 6, 2019
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: nemo.vrusso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,112 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Contextual Category Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.36 ▲0.47
Dashboard /wp-admin3.32 ▲0.0250.64 ▼0.19
Posts /wp-admin/edit.php3.37 ▲0.0150.92 ▼3.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.30 ▼11.21
Media Library /wp-admin/upload.php3.25 ▲0.0138.62 ▼4.44

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/contextual-category-widget/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_contextual_category_widget
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Contextual Category Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.22 ▼0.951.63 ▼0.0439.75 ▼4.41
Dashboard /wp-admin2,221 ▲154.84 ▼1.03103.73 ▲2.5241.94 ▼3.27
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.0437.94 ▼2.5735.35 ▼1.59
Add New Post /wp-admin/post-new.php1,545 ▼922.99 ▲4.91672.23 ▲55.9155.57 ▼3.08
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.01113.82 ▲13.7247.24 ▲1.01

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_contextual_category_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contextual-category-widget/contextual-category-widget.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: category, widget, taxonomy, tags

contextual-category-widget/contextual-category-widget.php Passed 13 tests

This is the main PHP file of "Contextual Category Widget" version 0.6.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
110 characters long description:
A WordPress widget showing the description of the first category in the single post currently being displayed.

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
There were no executable files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1173439

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin