94% acf-ajax-grid-gallery

Code Review | ACF Ajax Grid Gallery

WordPress plugin ACF Ajax Grid Gallery scored 94% 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: 5.9.2
  • 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 / 811 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 gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼309.00ms] Passed 4 tests

This is a short check of server-side resources used by ACF Ajax Grid Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0162.19 ▲5.21
Dashboard /wp-admin3.41 ▲0.0035.90 ▲0.49
Posts /wp-admin/edit.php3.64 ▲0.0039.89 ▼5.57
Add New Post /wp-admin/post-new.php6.89 ▼0.0898.04 ▼1,225.36
Media Library /wp-admin/upload.php3.30 ▼0.0124.18 ▼5.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ACF Ajax Grid Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲4516.01 ▲0.378.10 ▲2.192.24 ▼0.16
Dashboard /wp-admin2,892 ▲316.14 ▼0.03121.08 ▼31.74206.30 ▲19.85
Posts /wp-admin/edit.php2,688 ▼33.24 ▼0.0161.03 ▼2.69134.24 ▼18.99
Add New Post /wp-admin/post-new.php1,661 ▼715.71 ▼2.90411.66 ▼35.29170.48 ▲18.82
Media Library /wp-admin/upload.php1,701 ▲35.46 ▼0.03140.21 ▼4.69237.79 ▲41.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 | A shallow check that no browser errors were triggered
There were no browser issues 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: Please take inspiration from this readme.txt

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

"ACF Ajax Grid Gallery" version 1.3.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as 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 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were 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

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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