84% acf-ajax-grid-gallery

Code Review | ACF Ajax Grid Gallery

WordPress plugin ACF Ajax Grid Gallery scored84%from 54 tests.

About plugin

  • Plugin page: acf-ajax-grid-gal...
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2019
  • Latest release: Jan 23, 2020
  • Number of updates: 27
  • Update frequency: every 2.2 days
  • Top authors: hallowichig0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,190 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by ACF Ajax Grid Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.77 ▲0.13
Dashboard /wp-admin3.31 ▲0.0045.17 ▼6.20
Posts /wp-admin/edit.php3.36 ▲0.0052.22 ▲1.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.88 ▼12.23
Media Library /wp-admin/upload.php3.23 ▲0.0041.81 ▲4.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ACF Ajax Grid Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.76 ▲0.015.12 ▲3.3444.94 ▼3.72
Dashboard /wp-admin2,224 ▲214.83 ▼0.07107.86 ▼12.1939.22 ▼0.36
Posts /wp-admin/edit.php2,103 ▼02.02 ▼0.0235.42 ▼5.1734.31 ▼7.12
Add New Post /wp-admin/post-new.php1,547 ▲1623.11 ▼0.34627.45 ▲15.2863.90 ▲3.17
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.02100.32 ▼9.0442.25 ▼6.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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 | 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_add_local_field_group() in wp-content/plugins/acf-ajax-grid-gallery/inc/grid-gallery-fields/field_gallery.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

acf-ajax-grid-gallery/acf_ajax_grid_gallery.php 92% from 13 tests

The main PHP script in "ACF Ajax Grid Gallery" version 1.3.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-ajax-grid-gallery.php" instead of "acf_ajax_grid_gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,118 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54614512,167
PHP55044462
CSS2919334
Sass3185155

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected