94% advanced-custom-fields-number-slider

Code Review | Advanced Custom Fields: Number Slider

WordPress plugin Advanced Custom Fields: Number Slider scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 0.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8.2
  • WordPress version: 5.8.1
  • First release: Jan 2, 2014
  • Latest release: Jan 5, 2022
  • Number of updates: 28
  • Update frequency: every 104.5 days
  • Top authors: qlstudio (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

900+ active / 8,488 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼148.97ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields: Number Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0129.21 ▲2.00
Dashboard /wp-admin3.07 ▲0.0037.80 ▼3.93
Posts /wp-admin/edit.php3.12 ▲0.0132.05 ▼5.10
Add New Post /wp-admin/post-new.php5.43 ▼0.0175.10 ▼586.65
Media Library /wp-admin/upload.php3.01 ▲0.0126.88 ▼0.21

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Number Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲3915.60 ▼0.034.84 ▼0.5875.32 ▲0.69
Dashboard /wp-admin2,933 ▲346.05 ▼0.13113.71 ▼18.94165.76 ▼9.41
Posts /wp-admin/edit.php2,737 ▼03.24 ▲0.0064.26 ▲1.50138.64 ▼3.87
Add New Post /wp-admin/post-new.php3,923 ▲15519.41 ▲1.49449.68 ▼0.49160.41 ▼10.86
Media Library /wp-admin/upload.php1,749 ▼05.51 ▲0.02138.04 ▼3.67184.76 ▼3.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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
The following issues need your attention
  • 4× 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/advanced-custom-fields-number-slider/number-slider-v5.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/advanced-custom-fields-number-slider/acf-number-slider.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'acf_Field' not found in wp-content/plugins/advanced-custom-fields-number-slider/number-slider-v3.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-number-slider/number-slider-v4.php:3

User-side errors Passed 1 test

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


Plugin configuration 93% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Sliding Number Selector on edit screen), #2 (Configure Number Slider Field in ACF)
You can take inspiration from this readme.txt

advanced-custom-fields-number-slider/acf-number-slider.php 92% from 13 tests

The main PHP script in "Advanced Custom Fields: Number Slider" version 0.5.9 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-fields-number-slider.php" instead of "acf-number-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,113 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File34445145

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png20.32KB9.22KB▼ 54.65%
screenshot-1.png19.68KB9.37KB▼ 52.40%