83% custom-fields-for-woo-customers

Code Review | CIO Custom Fields for Woo

WordPress plugin CIO Custom Fields for Woo scored83%from 54 tests.

About plugin

  • Plugin page: custom-fields-for...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.9
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Dec 26, 2017
  • Number of updates: 18
  • Update frequency: every 47.3 days
  • Top authors: VisualData (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /5,153 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.05MB] [CPU: ▼3.75ms] Passed 4 tests

A check of server-side resources used by CIO Custom Fields for Woo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.39 ▲2.69
Dashboard /wp-admin3.37 ▲0.0250.18 ▼12.51
Posts /wp-admin/edit.php3.42 ▲0.0651.54 ▼1.86
Add New Post /wp-admin/post-new.php5.95 ▲0.0697.44 ▼2.10
Media Library /wp-admin/upload.php3.29 ▲0.0639.80 ▲1.49

Server storage [IO: ▲0.03MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

CIO Custom Fields for Woo: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.15 ▼1.461.84 ▼0.2041.84 ▲1.19
Dashboard /wp-admin2,224 ▲184.88 ▼0.9598.90 ▼8.5239.97 ▲0.31
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0141.58 ▲1.6736.66 ▲1.09
Add New Post /wp-admin/post-new.php1,542 ▲218.47 ▼0.03639.29 ▲35.8853.35 ▼1.68
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.04106.19 ▲4.1449.56 ▲2.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/custom-fields-for-woo-customers/custom-fields-woo-customers.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

custom-fields-for-woo-customers/custom-fields-woo-customers.php 85% from 13 tests

This is the main PHP file of "CIO Custom Fields for Woo" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 167 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-fields-for-woo-customers.php" instead of "custom-fields-woo-customers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin350 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP127085350

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity6.11
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods333.33%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin