84% zen-custom-fields

Code Review | Zen Custom Fields

WordPress plugin Zen Custom Fields scored84%from 54 tests.

About plugin

  • Plugin page: zen-custom-fields
  • Plugin version: 1.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: May 9, 2019
  • Number of updates: 15
  • Update frequency: every 86.4 days
  • Top authors: grzecho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,344 total downloads

Benchmarks

Plugin footprint 83% from 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.04MB] [CPU: ▼3.63ms] Passed 4 tests

A check of server-side resources used by Zen Custom Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.83 ▼8.20
Dashboard /wp-admin3.35 ▲0.0444.36 ▼6.09
Posts /wp-admin/edit.php3.40 ▲0.0445.55 ▼0.52
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.26 ▲0.28
Media Library /wp-admin/upload.php3.27 ▲0.0437.91 ▲5.69

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Zen Custom Fields
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.161.67 ▼0.4339.18 ▼11.56
Dashboard /wp-admin2,206 ▲154.88 ▼0.00107.98 ▼8.0339.23 ▼6.89
Posts /wp-admin/edit.php2,092 ▲62.05 ▲0.0140.20 ▲4.5733.92 ▲0.44
Add New Post /wp-admin/post-new.php1,514 ▼2017.73 ▼5.34581.19 ▼55.2755.69 ▼16.80
Media Library /wp-admin/upload.php1,391 ▲94.20 ▲0.0197.17 ▼1.9342.55 ▲0.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • 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 | 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/zen-custom-fields/zen-custom-fileds.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: custom templates, custom fields, custom keys, custom values, post meta

zen-custom-fields/zen-custom-fileds.php 92% from 13 tests

The main PHP script in "Zen Custom Fields" version 1.16 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("zen-custom-fields.php" instead of "zen-custom-fileds.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected328 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31917247
Markdown131081

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity7.57
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions9
▷ Named functions9100.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
PNG images were not found in this plugin