89% color-scheme-field-for-advanced-custom-fields-pro

Code Review | Color Scheme Field for Advanced Custom Fields PRO

WordPress plugin Color Scheme Field for Advanced Custom Fields PRO scored89%from 54 tests.

About plugin

  • Plugin page: color-scheme-fiel...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.9.0
  • WordPress version: 6.3.1
  • First release: Jan 16, 2019
  • Latest release: Feb 27, 2019
  • Number of updates: 15
  • Update frequency: every 2.9 days
  • Top authors: hugomoran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,659 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.01MB] [CPU: ▼5.22ms] Passed 4 tests

A check of server-side resources used by Color Scheme Field for Advanced Custom Fields PRO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.57 ▼2.83
Dashboard /wp-admin3.32 ▲0.0149.51 ▼4.27
Posts /wp-admin/edit.php3.37 ▲0.0150.10 ▲3.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.31 ▼17.19
Media Library /wp-admin/upload.php3.24 ▲0.0149.86 ▲11.34

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Color Scheme Field for Advanced Custom Fields PRO
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.33 ▼0.021.59 ▼0.0142.81 ▲2.57
Dashboard /wp-admin2,197 ▲175.66 ▲0.1488.39 ▲1.6638.79 ▲0.65
Posts /wp-admin/edit.php2,105 ▲21.99 ▲0.0041.51 ▼0.1235.75 ▼2.25
Add New Post /wp-admin/post-new.php1,528 ▼323.07 ▼0.11667.64 ▲48.8467.40 ▲16.69
Media Library /wp-admin/upload.php1,402 ▲54.21 ▼0.0097.48 ▼1.3045.84 ▲1.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: You can look at the official readme.txt

color-scheme-field-for-advanced-custom-fields-pro/acf-color_scheme.php 92% from 13 tests

The main PHP file in "Color Scheme Field for Advanced Custom Fields PRO" ver. 1.5.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("color-scheme-field-for-advanced-custom-fields-pro.php" instead of "acf-color_scheme.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin229 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2157195183
CSS10029
JavaScript1193314
Markdown1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.50
▷ Minimum class complexity2.00
▷ Maximum class complexity23.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected