84% cmb2-taxonomy

Code Review | CMB2 Taxonomy

WordPress plugin CMB2 Taxonomy scored84%from 54 tests.

About plugin

  • Plugin page: cmb2-taxonomy
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.1.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2015
  • Latest release: Dec 21, 2015
  • Number of updates: 13
  • Update frequency: every 18.9 days
  • Top authors: jcchavezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,699 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.21ms] Passed 4 tests

Analyzing server-side resources used by CMB2 Taxonomy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.29 ▲4.03
Dashboard /wp-admin3.36 ▲0.0148.67 ▼18.86
Posts /wp-admin/edit.php3.41 ▲0.0547.91 ▼8.52
Add New Post /wp-admin/post-new.php5.94 ▲0.05110.77 ▲3.34
Media Library /wp-admin/upload.php3.28 ▲0.0536.79 ▼0.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by CMB2 Taxonomy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.32 ▼1.084.54 ▲2.9539.03 ▼5.11
Dashboard /wp-admin2,224 ▲336.04 ▲0.18104.52 ▼2.3139.32 ▼6.68
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0140.69 ▼0.3135.80 ▼1.55
Add New Post /wp-admin/post-new.php1,545 ▲1923.19 ▲5.72675.98 ▼6.8550.48 ▼5.61
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.07100.33 ▼10.0944.88 ▼0.03

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/cmb2-taxonomy/includes/CMB2_Taxonomy.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cmb2-taxonomy/plugin.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cmb2-taxonomy/includes/CMB2_Taxonomy.php:17
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/cmb2-taxonomy/includes/CMB2_Taxonomy.php on line 15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/cmb2-taxonomy/includes/CMB2_Taxonomy.php on line 15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/cmb2-taxonomy/includes/CMB2_Taxonomy.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cmb2-taxonomy/includes/CMB2_Taxonomy.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: cmb2, fields, settings, forms, metaboxes...

cmb2-taxonomy/plugin.php 92% from 13 tests

The primary PHP file in "CMB2 Taxonomy" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cmb2-taxonomy.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin369 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP548143341
Markdown112028

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin