84% adapter-gravity-add-on

Code Review | Adapter Gravity Add-On

WordPress plugin Adapter Gravity Add-On scored84%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: 6.3.1
  • 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,776 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
Install script ran successfully

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

An overview of server-side resources used by Adapter Gravity Add-On
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.42 ▼8.26
Dashboard /wp-admin3.32 ▼0.0346.78 ▼17.33
Posts /wp-admin/edit.php3.37 ▲0.0149.74 ▲0.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.31 ▼20.19
Media Library /wp-admin/upload.php3.24 ▲0.0133.12 ▼1.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Adapter Gravity Add-On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.77 ▲0.472.32 ▼0.0242.34 ▼0.92
Dashboard /wp-admin2,209 ▲185.85 ▲0.97109.30 ▼8.7240.29 ▼4.22
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0035.41 ▼18.2738.53 ▼5.79
Add New Post /wp-admin/post-new.php1,534 ▲623.25 ▲5.03674.16 ▲50.4059.09 ▲5.72
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.0197.33 ▼5.7241.45 ▼2.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GFAddOn' not found in wp-content/plugins/adapter-gravity-add-on/php/class-adapter-add-on.php:19
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

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

The main PHP file in "Adapter Gravity Add-On" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 350 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions 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 cyclomatic complexity issues were detected for this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin