68% gravitate-automated-tester

Code Review | Gravitate Automated Tester

WordPress plugin Gravitate Automated Tester scored 68% from 54 tests.

About plugin

  • Plugin page: gravitate-automat...
  • Plugin version: 1.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.3
  • WordPress version: 6.3.1
  • First release: Dec 21, 2015
  • Latest release: Jun 24, 2016
  • Number of updates: 20
  • Update frequency: every 9.3 days
  • Top authors: Gravitate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,230 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Gravitate Automated Tester
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.05 ▼0.28
Dashboard /wp-admin3.32 ▲0.0243.69 ▼8.54
Posts /wp-admin/edit.php3.37 ▲0.0247.77 ▼0.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.02 ▼0.23
Media Library /wp-admin/upload.php3.25 ▲0.0235.12 ▲1.25
Gravitate Tester /wp-admin/tools.php?page=gravitate_tester3.1932.68

Server storage [IO: ▲0.08MB] [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: 18 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
gravitate_tester_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravitate Automated Tester
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.45 ▲0.051.82 ▼0.1340.72 ▼3.97
Dashboard /wp-admin2,213 ▲256.06 ▲1.15113.58 ▼2.8842.71 ▼1.92
Posts /wp-admin/edit.php2,097 ▲82.09 ▲0.0940.67 ▲4.6135.00 ▲0.21
Add New Post /wp-admin/post-new.php1,545 ▲2518.20 ▼5.31593.46 ▼69.5149.69 ▼7.42
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.0196.10 ▼3.4341.67 ▼2.12
Gravitate Tester /wp-admin/tools.php?page=gravitate_tester1,5181.8430.2635.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'GRAV_TESTS' does not have a method 'deactivate'
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • gravitate_tester_settings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=gravitate_tester
    • > Notice in wp-content/plugins/gravitate-automated-tester/gravitate-tester.php+550
    Undefined index: section

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/gravitate-automated-tester/gravitate-tester.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

gravitate-automated-tester/gravitate-tester.php 92% from 13 tests

"Gravitate Automated Tester" version 1.4.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gravitate-automated-tester.php" instead of "gravitate-tester.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
Good job! No executable or dangerous file extensions detected2,828 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP175542422,828

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity20.88
▷ Minimum class complexity2.00
▷ Maximum class complexity136.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods148
▷ Static methods3624.32%
▷ Public methods13792.57%
▷ Protected methods00.00%
▷ Private methods117.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin