99% custom-field-variables

Code Review | Custom Field Variables

WordPress plugin Custom Field Variables scored 99% from 54 tests.

About plugin

  • Plugin page: custom-field-vari...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 5.8.1
  • First release: Jul 28, 2017
  • Latest release: Jul 30, 2017
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: wpnook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 530 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼150.32ms] Passed 4 tests

Server-side resources used by Custom Field Variables
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0532.64 ▼1.09
Dashboard /wp-admin3.11 ▲0.0647.18 ▼5.10
Posts /wp-admin/edit.php3.22 ▲0.1244.61 ▼6.00
Add New Post /wp-admin/post-new.php5.47 ▲0.0498.93 ▼584.58
Media Library /wp-admin/upload.php3.05 ▲0.0532.83 ▼5.59

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Custom Field Variables
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,688 ▲9215.92 ▲0.5910.35 ▼2.0044.18 ▼9.82
Dashboard /wp-admin2,979 ▲425.94 ▼0.00166.91 ▲3.40108.38 ▼1.85
Posts /wp-admin/edit.php2,748 ▲92.73 ▲0.0076.69 ▲4.7388.90 ▼11.61
Add New Post /wp-admin/post-new.php1,692 ▲918.33 ▲2.21399.54 ▼25.32116.27 ▲0.70
Media Library /wp-admin/upload.php1,816 ▲95.04 ▼0.01174.65 ▲16.26122.64 ▲1.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

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
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: custom-fields, meta, tinymce

custom-field-variables/cw-custom-field-variables.php 77% from 13 tests

The main PHP script in "Custom Field Variables" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 161 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-field-variables.php" instead of "cw-custom-field-variables.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin273 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10119449209
JavaScript14059
CSS1145

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin