89% wp-media-categories

Code Review | WP Media Categories

WordPress plugin WP Media Categories scored89%from 54 tests.

About plugin

  • Plugin page: wp-media-categories
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Oct 27, 2015
  • Latest release: May 14, 2020
  • Number of updates: 9
  • Update frequency: every 184.6 days
  • Top authors: johnjamesjacoby (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /16,500 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.83ms] Passed 4 tests

A check of server-side resources used by WP Media Categories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.81 ▼3.00
Dashboard /wp-admin3.34 ▲0.0345.95 ▲0.31
Posts /wp-admin/edit.php3.39 ▲0.0340.98 ▼2.83
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.13 ▼8.21
Media Library /wp-admin/upload.php3.26 ▲0.0333.40 ▼1.28
Categories /wp-admin/edit-tags.php?taxonomy=media_category&post_type=attachment3.3435.98

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Media Categories
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.74 ▲0.391.57 ▲0.0636.97 ▼3.67
Dashboard /wp-admin2,198 ▲185.62 ▲0.01104.50 ▲21.8851.86 ▲10.43
Posts /wp-admin/edit.php2,106 ▲242.03 ▼0.0033.65 ▼0.6935.35 ▲1.51
Add New Post /wp-admin/post-new.php1,537 ▲923.08 ▼0.22663.29 ▲10.4757.34 ▼4.78
Media Library /wp-admin/upload.php1,431 ▲314.26 ▲0.0694.68 ▼10.3743.50 ▼1.39
Categories /wp-admin/edit-tags.php?taxonomy=media_category&post_type=attachment1,2772.1225.6328.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-media-categories === )
You can take inspiration from this readme.txt

wp-media-categories/wp-media-categories.php 92% from 13 tests

Analyzing the main PHP file in "WP Media Categories" version 2.1.0
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/wp-media-categories/lang" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin811 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8251342696
JavaScript1181193
CSS13222

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.75
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin