93% advanced-custom-fields-limiter-field

Code Review | Advanced Custom Fields: Limiter Field

WordPress plugin Advanced Custom Fields: Limiter Field scored 93% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 5.9.2
  • First release: Apr 13, 2013
  • Latest release: Aug 21, 2014
  • Number of updates: 33
  • Update frequency: every 15.0 days
  • Top authors: Atomicsmash (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active / 13,227 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Advanced Custom Fields: Limiter Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0152.26 ▲2.54
Dashboard /wp-admin3.41 ▲0.0132.57 ▼0.84
Posts /wp-admin/edit.php3.65 ▲0.0137.22 ▼3.82
Add New Post /wp-admin/post-new.php6.91 ▼0.0995.50 ▼1,178.47
Media Library /wp-admin/upload.php3.30 ▲0.0024.07 ▲0.22

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Limiter Field
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2915.98 ▲0.336.50 ▲0.572.18 ▼0.68
Dashboard /wp-admin2,888 ▲276.09 ▼0.11117.33 ▼9.52153.50 ▼2.33
Posts /wp-admin/edit.php2,691 ▼33.24 ▲0.0162.45 ▼6.18138.51 ▼9.57
Add New Post /wp-admin/post-new.php1,711 ▼020.85 ▲0.09412.46 ▼23.43149.12 ▼5.66
Media Library /wp-admin/upload.php1,698 ▼05.46 ▼0.04136.05 ▼2.45183.93 ▼5.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× 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-limiter-field/limiter-v3.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-limiter-field/limiter-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_wysiwyg' not found in wp-content/plugins/advanced-custom-fields-limiter-field/limiter-wysiwyg-v4.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-limiter-field/acf-limiter.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-limiter-field/limiter-v5.php:3

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)
No browser errors were detected

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: You can take inspiration from this readme.txt

advanced-custom-fields-limiter-field/acf-limiter.php 85% from 13 tests

"Advanced Custom Fields: Limiter Field" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 211 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-custom-fields-limiter-field.php" instead of "acf-limiter.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 plugin525 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5454836424
JavaScript2864291
CSS21410

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin