84% acf-range-field

Code Review | Advanced Custom Fields: Range Field

WordPress plugin Advanced Custom Fields: Range Field scored84%from 54 tests.

About plugin

  • Plugin page: acf-range-field
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2013
  • Latest release: Aug 31, 2014
  • Number of updates: 18
  • Update frequency: every 13.9 days
  • Top authors: viriava (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,276 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.92ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Fields: Range Field
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.43 ▼3.38
Dashboard /wp-admin3.31 ▲0.0151.01 ▼3.02
Posts /wp-admin/edit.php3.36 ▲0.0149.05 ▲0.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.74 ▲4.55
Media Library /wp-admin/upload.php3.23 ▲0.0136.08 ▼1.54

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Range Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.291.79 ▲0.0144.04 ▲2.56
Dashboard /wp-admin2,195 ▲155.61 ▼0.0996.32 ▲5.8841.65 ▼1.43
Posts /wp-admin/edit.php2,097 ▼61.99 ▲0.0035.93 ▼3.1336.78 ▼1.15
Add New Post /wp-admin/post-new.php1,559 ▲1923.15 ▲4.81682.02 ▲40.7151.23 ▼5.93
Media Library /wp-admin/upload.php1,403 ▲34.29 ▲0.0897.81 ▼7.3142.31 ▼0.05

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

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

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

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
  • 3× 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-range-field/range-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-range-field/acf-range.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-range-field/range-v5.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: acf, jquery, range, field

acf-range-field/acf-range.php 92% from 13 tests

The main file in "Advanced Custom Fields: Range Field" v. 1.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-range-field.php" instead of "acf-range.php")

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
Good job! No executable or dangerous file extensions detected1,150 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3296550547
CSS22331493
JavaScript34044110

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%