94% cfs-custom-category-fields

Code Review | CFS Custom Category Fields

WordPress plugin CFS Custom Category Fields scored 94% from 54 tests.

About plugin

  • Plugin page: cfs-custom-catego...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 5.8.1
  • First release: Aug 1, 2014
  • Latest release: Nov 8, 2015
  • Number of updates: 22
  • Update frequency: every 21.1 days
  • Top authors: GatorDog (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 4,081 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼171.95ms] Passed 4 tests

A check of server-side resources used by CFS Custom Category Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1936.37 ▲13.64
Dashboard /wp-admin3.14 ▲0.0844.28 ▲0.17
Posts /wp-admin/edit.php3.25 ▲0.1444.69 ▲0.34
Add New Post /wp-admin/post-new.php5.50 ▲0.0679.73 ▼687.17
Media Library /wp-admin/upload.php3.08 ▲0.0831.36 ▼1.12

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for CFS Custom Category Fields
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,714 ▲11815.82 ▲0.128.83 ▼0.4846.74 ▼0.67
Dashboard /wp-admin2,984 ▲535.95 ▼0.01134.21 ▼3.85108.23 ▼11.74
Posts /wp-admin/edit.php2,750 ▲142.72 ▼0.0060.94 ▼0.7786.06 ▼1.53
Add New Post /wp-admin/post-new.php1,679 ▼418.71 ▼0.03378.87 ▲12.40106.67 ▼1.56
Media Library /wp-admin/upload.php1,818 ▲115.04 ▼0.04144.39 ▼1.87116.19 ▲7.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 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 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 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/cfs-custom-category-fields/cfs-taxonomy.php:364
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cfs-custom-category-fields/trunk/cfs-taxonomy.php:364

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
3 plugin tags: custom field suite addon, category custom fields, category meta data

cfs-custom-category-fields/cfs-taxonomy.php 92% from 13 tests

The entry point to "CFS Custom Category Fields" version 1.3.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cfs-custom-category-fields.php" instead of "cfs-taxonomy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected360 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23292357
CSS1003

PHP code Passed 2 tests

This is a short overview 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.47
Average class complexity30.00
▷ Minimum class complexity7.00
▷ Maximum class complexity53.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods56
▷ Static methods4885.71%
▷ Public methods4885.71%
▷ Protected methods814.29%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected