89% acf-code-generator

Code Review | ACF Code Generator

WordPress plugin ACF Code Generator scored89%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: 6.3.1
  • 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

3 reviews

Install metrics

300+ active /2,893 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.07MB] [CPU: ▼6.53ms] Passed 4 tests

Analyzing server-side resources used by ACF Code Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.40 ▼2.04
Dashboard /wp-admin3.40 ▲0.0948.58 ▼1.77
Posts /wp-admin/edit.php3.51 ▲0.1548.07 ▼1.45
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.96 ▼20.84
Media Library /wp-admin/upload.php3.32 ▲0.0935.72 ▼0.13

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

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

Browser metrics Passed 4 tests

ACF Code Generator: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.104.98 ▲3.2643.58 ▲5.35
Dashboard /wp-admin2,203 ▲155.79 ▲0.7599.80 ▼16.0637.38 ▼7.43
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0435.19 ▲1.3734.71 ▼1.60
Add New Post /wp-admin/post-new.php1,544 ▲2518.08 ▼4.89593.49 ▼124.8864.62 ▲9.54
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.0799.14 ▼0.9243.37 ▼0.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

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

The main file in "ACF Code Generator" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,501 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP234603791,002
CSS27718412
JavaScript3433684
SVG1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected