84% gravity-pre-submission-confirmation

Code Review | Gravity Pre-submission Confirmation

WordPress plugin Gravity Pre-submission Confirmation scored84%from 54 tests.

About plugin

  • Plugin page: gravity-pre-submi...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Oct 8, 2023
  • Number of updates: 17
  • Update frequency: every 161.2 days
  • Top authors: patilswapnilv (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /9,137 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.90ms] Passed 4 tests

This is a short check of server-side resources used by Gravity Pre-submission Confirmation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0340.59 ▼9.23
Dashboard /wp-admin3.38 ▲0.0353.31 ▲3.43
Posts /wp-admin/edit.php3.49 ▲0.0952.89 ▼3.77
Add New Post /wp-admin/post-new.php5.96 ▲0.0387.20 ▼18.04
Media Library /wp-admin/upload.php3.30 ▲0.0341.42 ▲4.68

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Pre-submission Confirmation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.23 ▼0.332.14 ▲0.2743.92 ▲2.13
Dashboard /wp-admin2,192 ▲125.62 ▼0.0494.65 ▲5.1938.31 ▼3.80
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.1639.57 ▲0.5136.90 ▲2.43
Add New Post /wp-admin/post-new.php1,528 ▼223.03 ▼0.02661.37 ▲11.4969.76 ▲18.30
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.0296.76 ▼6.2646.52 ▼8.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravity-pre-submission-confirmation/gravity-pre-submission-confirmation.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Page break), #2 (HTML Field)
Please take inspiration from this readme.txt

gravity-pre-submission-confirmation/gravity-pre-submission-confirmation.php 92% from 13 tests

The main file in "Gravity Pre-submission Confirmation" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
No dangerous file extensions were detected157 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2357130
Markdown117027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
PNG images were not found in this plugin