84% fx-categories-widget

Code Review | f(x) Categories Widget

WordPress plugin f(x) Categories Widget scored84%from 54 tests.

About plugin

  • Plugin page: fx-categories-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jan 9, 2016
  • Latest release: Dec 8, 2016
  • Number of updates: 9
  • Update frequency: every 37.1 days
  • Top authors: turtlepod (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.00ms] Passed 4 tests

Analyzing server-side resources used by f(x) Categories Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.98 ▲1.13
Dashboard /wp-admin3.32 ▼0.0346.80 ▼18.45
Posts /wp-admin/edit.php3.37 ▲0.0148.89 ▲1.16
Add New Post /wp-admin/post-new.php5.90 ▲0.01104.76 ▼3.83
Media Library /wp-admin/upload.php3.24 ▲0.0137.72 ▲4.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for f(x) Categories Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.35 ▼0.321.71 ▼0.1944.17 ▼2.83
Dashboard /wp-admin2,195 ▲155.62 ▼0.0082.12 ▼9.7736.55 ▼5.71
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0137.12 ▼0.2935.58 ▼1.69
Add New Post /wp-admin/post-new.php1,526 ▼023.55 ▲0.49666.63 ▼14.2355.56 ▼1.20
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0495.65 ▼15.3543.54 ▼3.36

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_widget_fx_categories
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means 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
Please fix the following items
  • 2× 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/fx-categories-widget/includes/widgets.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/fx-categories-widget/includes/functions.php:148

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 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
6 plugin tags: tag, custom taxonomy, categories, post tag, widget...

fx-categories-widget/fx-categories-widget.php Passed 13 tests

"f(x) Categories Widget" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
39 characters long description:
Categories widget with taxonomy option.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin287 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP372159238
PO File19936
Markdown14013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity17.50
▷ Minimum class complexity10.00
▷ Maximum class complexity25.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 are no PNG files in this plugin