83% advanced-custom-fields-limiter-field

Code Review | Advanced Custom Fields: Limiter Field

WordPress plugin Advanced Custom Fields: Limiter Field scored83%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: 6.3.1
  • 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

1,000+ active /13,753 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
Installer ran successfully

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

An overview of server-side resources used by Advanced Custom Fields: Limiter Field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.66 ▼3.71
Dashboard /wp-admin3.31 ▲0.0149.45 ▼3.93
Posts /wp-admin/edit.php3.36 ▲0.0043.62 ▼10.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.01 ▼21.89
Media Library /wp-admin/upload.php3.23 ▲0.0036.85 ▲0.97

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Limiter Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▲0.131.87 ▲0.2644.52 ▲5.02
Dashboard /wp-admin2,192 ▲125.57 ▼0.1084.96 ▼10.3641.11 ▼6.97
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0040.26 ▲2.2437.67 ▼3.73
Add New Post /wp-admin/post-new.php1,526 ▼923.03 ▲4.70663.67 ▲3.9848.99 ▼17.50
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.05100.35 ▼6.9543.14 ▲0.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not 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
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > 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: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-limiter-field/limiter-v5.php:3
    • > 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: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-limiter-field/acf-limiter.php:21

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 issues were found

Optimizations

Plugin configuration 90% 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 take inspiration from this readme.txt

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

This is the main PHP file of "Advanced Custom Fields: Limiter Field" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-fields-limiter-field.php" instead of "acf-limiter.php")
  • Description: The description should be shorter than 140 characters (currently 211 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected525 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5454836424
JavaScript2864291
CSS21410

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin