84% acf-code-snippets

Code Review | Advanced Custom Fields Code Snippets

WordPress plugin Advanced Custom Fields Code Snippets scored84%from 54 tests.

About plugin

  • Plugin page: acf-code-snippets
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2019
  • Latest release: Jul 1, 2019
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: kenkeydev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,235 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by Advanced Custom Fields Code Snippets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.19 ▼0.36
Dashboard /wp-admin3.35 ▲0.0552.72 ▼0.41
Posts /wp-admin/edit.php3.40 ▲0.0550.50 ▼1.39
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.71 ▼21.58
Media Library /wp-admin/upload.php3.28 ▲0.0537.18 ▲1.24

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields Code Snippets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.171.73 ▼0.0544.75 ▼1.63
Dashboard /wp-admin2,195 ▲155.56 ▼0.1197.08 ▲6.4542.78 ▼4.91
Posts /wp-admin/edit.php2,103 ▼02.06 ▲0.0737.52 ▼2.1734.59 ▼3.94
Add New Post /wp-admin/post-new.php1,545 ▲1923.01 ▲5.29659.68 ▲11.3051.31 ▼4.77
Media Library /wp-admin/upload.php1,397 ▼34.24 ▼0.06101.85 ▼7.1245.85 ▲0.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/acf-code-snippets/acf_code_snippets.php:19

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: acf, famousui, boomcdn, advanced custom fields, kennykey

acf-code-snippets/acf_code_snippets.php 85% from 13 tests

The entry point to "Advanced Custom Fields Code Snippets" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("acf-code-snippets.php" instead of "acf_code_snippets.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
Good job! No executable or dangerous file extensions detected485 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12912389
JavaScript129096

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin