99% acf-code-generator

Code Review | ACF Code Generator

WordPress plugin ACF Code Generator scored 99% from 54 tests.

About plugin

  • Plugin page: acf-code-generator
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.9.2
  • First release: Apr 9, 2021
  • Latest release: Jul 21, 2021
  • Number of updates: 10
  • Update frequency: every 10.3 days
  • Top authors: deepakanand767 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 1,792 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼297.74ms] Passed 4 tests

A check of server-side resources used by ACF Code Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.58 ▼2.19
Dashboard /wp-admin3.50 ▲0.0934.19 ▼0.14
Posts /wp-admin/edit.php3.73 ▲0.0938.98 ▲1.52
Add New Post /wp-admin/post-new.php6.98 ▲0.0095.66 ▼1,188.98
Media Library /wp-admin/upload.php3.39 ▲0.0925.73 ▲0.36

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ACF Code Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲2115.81 ▲0.236.08 ▲0.202.37 ▲0.31
Dashboard /wp-admin2,895 ▲346.14 ▼0.03118.71 ▼19.07158.01 ▼3.75
Posts /wp-admin/edit.php2,694 ▼03.23 ▼0.0164.06 ▲1.10141.90 ▲0.04
Add New Post /wp-admin/post-new.php1,711 ▼621.82 ▲0.63437.14 ▼1.87156.12 ▼0.24
Media Library /wp-admin/upload.php1,701 ▲35.49 ▼0.02145.55 ▲6.62190.56 ▲5.91

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 Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

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 93% 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 require attention:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

acf-code-generator/acf_code_generator.php 92% from 13 tests

The main PHP file in "ACF Code Generator" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acf-code-generator.php" instead of "acf_code_generator.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
There were no executable files found in this plugin1,501 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP234603791,002
CSS27718412
JavaScript3433684
SVG1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods39
▷ Static methods00.00%
▷ Public methods1230.77%
▷ Protected methods615.38%
▷ Private methods2153.85%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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