94% adapter-gravity-add-on

Code Review | Adapter Gravity Add-On

WordPress plugin Adapter Gravity Add-On scored 94% from 54 tests.

About plugin

  • Plugin page: adapter-gravity-a...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 5.9.2
  • First release: Oct 9, 2014
  • Latest release: Aug 26, 2017
  • Number of updates: 8
  • Update frequency: every 131.5 days
  • Top authors: ryankienstra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,533 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼304.40ms] Passed 4 tests

This is a short check of server-side resources used by Adapter Gravity Add-On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0251.40 ▼0.22
Dashboard /wp-admin3.42 ▲0.0131.99 ▼3.65
Posts /wp-admin/edit.php3.66 ▲0.0135.64 ▼3.36
Add New Post /wp-admin/post-new.php6.89 ▼0.0890.79 ▼1,210.35
Media Library /wp-admin/upload.php3.31 ▲0.0125.90 ▲0.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Adapter Gravity Add-On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.87 ▲0.225.92 ▲0.052.52 ▼0.14
Dashboard /wp-admin2,895 ▲376.17 ▼0.00118.61 ▼19.52158.61 ▼7.33
Posts /wp-admin/edit.php2,688 ▲33.23 ▼0.0175.12 ▲5.06138.40 ▼12.87
Add New Post /wp-admin/post-new.php1,711 ▲2421.31 ▲1.59450.28 ▼3.03161.37 ▼0.53
Media Library /wp-admin/upload.php1,695 ▼65.50 ▲0.00150.98 ▲6.26207.61 ▲23.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AdapterGravityAddOn\\add_action() in wp-content/plugins/adapter-gravity-add-on/php/class-plugin.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'GFAddOn' not found in wp-content/plugins/adapter-gravity-add-on/php/class-adapter-add-on.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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tested up to: Version not formatted correctly
The official readme.txt might help

adapter-gravity-add-on/adapter-gravity-add-on.php 92% from 13 tests

The main file in "Adapter Gravity Add-On" 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:
  • Description: Keep the plugin description shorter than 140 characters (currently 350 characters long)

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
No dangerous file extensions were detected337 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP685428255
CSS116866
XML15216

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.20
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods3096.77%
▷ Protected methods00.00%
▷ Private methods13.23%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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