94% acf-rgba-color-picker

Code Review | ACF RGBA Color Picker

WordPress plugin ACF RGBA Color Picker scored 94% from 54 tests.

About plugin

  • Plugin page: acf-rgba-color-pi...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 5.9.2
  • First release: Mar 19, 2017
  • Latest release: Aug 22, 2020
  • Number of updates: 22
  • Update frequency: every 56.9 days
  • Top authors: tmconnect (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10,000+ active / 29,979 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼290.63ms] Passed 4 tests

This is a short check of server-side resources used by ACF RGBA Color Picker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.4058.03 ▲38.95
Dashboard /wp-admin3.41 ▲0.0033.69 ▲1.14
Posts /wp-admin/edit.php3.64 ▲0.0037.99 ▼0.97
Add New Post /wp-admin/post-new.php6.88 ▼0.0997.02 ▼1,162.86
Media Library /wp-admin/upload.php3.29 ▲0.0023.49 ▲0.19

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF RGBA Color Picker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,780 ▲2515.69 ▲0.025.92 ▼0.072.76 ▲0.33
Dashboard /wp-admin2,878 ▲176.13 ▼0.04129.73 ▼7.49184.68 ▼22.63
Posts /wp-admin/edit.php2,691 ▲33.24 ▲0.0165.15 ▼0.90145.01 ▲1.15
Add New Post /wp-admin/post-new.php1,661 ▼016.37 ▼0.91421.36 ▼22.42186.68 ▼0.34
Media Library /wp-admin/upload.php1,701 ▲65.48 ▼0.03154.15 ▲6.35229.27 ▲15.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
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
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-rgba-color-picker/fields/acf-rgba-color-picker-v5.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: color, advanced custom fields, acf, rgba color picker, rgba...

acf-rgba-color-picker/acf-rgba-color-picker.php 92% from 13 tests

The main file in "ACF RGBA Color Picker" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin487 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP275113211
PO File24242149
JavaScript2171586
CSS110541

PHP code Passed 2 tests

This is a very shot 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.26
Average class complexity9.00
▷ Minimum class complexity6.00
▷ Maximum class complexity12.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin