84% custom-cat

Code Review | Custom Cat

WordPress plugin Custom Cat scored84%from 54 tests.

About plugin

  • Plugin page: custom-cat
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.6.0
  • WordPress version: 6.3.1
  • First release: Nov 3, 2016
  • Latest release: Nov 16, 2016
  • Number of updates: 9
  • Update frequency: every 1.4 days
  • Top authors: rmasfer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.42ms] Passed 4 tests

Analyzing server-side resources used by Custom Cat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0642.68 ▼1.94
Dashboard /wp-admin3.41 ▲0.0751.65 ▲0.37
Posts /wp-admin/edit.php3.53 ▲0.1350.16 ▼13.56
Add New Post /wp-admin/post-new.php6.00 ▲0.0888.27 ▼10.56
Media Library /wp-admin/upload.php3.34 ▲0.0744.20 ▲7.90
Custom Cat /wp-admin/admin.php?page=custom-cat3.3133.98

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Cat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲16913.82 ▼0.539.53 ▲7.6545.29 ▲2.97
Dashboard /wp-admin2,215 ▲385.83 ▲0.2398.56 ▲9.5142.67 ▼0.38
Posts /wp-admin/edit.php2,135 ▲322.35 ▲0.3634.34 ▼6.9833.53 ▼5.04
Add New Post /wp-admin/post-new.php6,305 ▲4,77026.70 ▲8.46935.50 ▲307.4860.43 ▼13.16
Media Library /wp-admin/upload.php1,435 ▲354.53 ▲0.31113.62 ▲11.6247.02 ▲3.66
Custom Cat /wp-admin/admin.php?page=custom-cat8391.8726.9425.45

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-cat/view/custom-cat-box-content.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/custom-cat/view/main-options-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-cat/core/controller/class-post-meta-xhr.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-cat/core/hooks/class-hide-default.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'cc_base_controller' not found in wp-content/plugins/custom-cat/core/controller/class-post-meta.php:6
    • > PHP Notice
      Undefined variable: available_taxonomies in wp-content/plugins/custom-cat/view/custom-cat-box-content.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/custom-cat/custom-cat.php:10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/custom-cat/view/custom-cat-box-content.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'cc_base_controller' not found in wp-content/plugins/custom-cat/core/controller/class-main-options-page.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: taxonomy, taxonomies, categories, taxonomy manager, searchable category...

custom-cat/custom-cat.php Passed 13 tests

Analyzing the main PHP file in "Custom Cat" version 1.0.0
42 characters long description:
Customised taxonomy selector for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected12,898 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript89069298,507
HTML36503,200
CSS57046686
PHP127625407
JSON20094
Markdown1204

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.44
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods2262.86%
▷ Protected methods925.71%
▷ Private methods411.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/library/chosen/docsupport/oss-credit.png4.30KB3.26KB▼ 24.02%
assets/library/chosen/docsupport/chosen.png1.47KB2.08KB0.00%
assets/library/chosen/chosen-sprite.png0.53KB0.88KB0.00%
assets/library/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%