84% wp-advanced-categories-widget

Code Review | WP Advanced Categories Widget

WordPress plugin WP Advanced Categories Widget scored84%from 54 tests.

About plugin

  • Plugin page: wp-advanced-categ...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2019
  • Latest release: Sep 4, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: lakialex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /694 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.00ms] Passed 4 tests

This is a short check of server-side resources used by WP Advanced Categories Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0937.51 ▼0.55
Dashboard /wp-admin3.39 ▲0.0445.76 ▼12.45
Posts /wp-admin/edit.php3.51 ▲0.1547.75 ▲3.95
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.87 ▼2.50
Media Library /wp-admin/upload.php3.32 ▲0.0834.96 ▲3.52

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_wpacw_widget
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Advanced Categories Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲16014.00 ▼0.295.13 ▲2.7339.09 ▼15.17
Dashboard /wp-admin2,215 ▲334.86 ▼1.00106.33 ▲2.9738.78 ▼3.33
Posts /wp-admin/edit.php2,094 ▲52.02 ▼0.0340.25 ▼0.6635.74 ▲3.78
Add New Post /wp-admin/post-new.php1,518 ▼2423.14 ▲5.00608.79 ▼25.0051.96 ▲1.20
Media Library /wp-admin/upload.php1,398 ▲74.21 ▼0.1394.81 ▼8.0041.68 ▼3.92

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

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-advanced-categories-widget/inc/class-wpacw-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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: lightweight, image, widgets, categories, thumbnails...

wp-advanced-categories-widget/wpacw.php 85% from 13 tests

The principal PHP file in "WP Advanced Categories Widget" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-advanced-categories-widget.php" instead of "wpacw.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected446 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11147512309
CSS22013135
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.38
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected