84% optingun

Code Review | Optingun

WordPress plugin Optingun scored84%from 54 tests.

About plugin

  • Plugin page: optingun
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 31, 2018
  • Latest release: Jul 31, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: optingun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼5.83ms] Passed 4 tests

This is a short check of server-side resources used by Optingun
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.69 ▼1.63
Dashboard /wp-admin3.31 ▲0.0149.13 ▼3.13
Posts /wp-admin/edit.php3.36 ▲0.0147.67 ▼2.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.05 ▼16.33
Media Library /wp-admin/upload.php3.23 ▲0.0137.47 ▲0.61

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Optingun
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲4214.47 ▼0.142.06 ▼0.0640.96 ▼3.33
Dashboard /wp-admin2,213 ▲255.82 ▲0.92102.87 ▼7.6068.81 ▲20.51
Posts /wp-admin/edit.php2,099 ▲72.00 ▼0.0134.53 ▼6.2932.44 ▼5.39
Add New Post /wp-admin/post-new.php1,526 ▼517.48 ▼5.95706.12 ▲45.2555.58 ▲4.69
Media Library /wp-admin/upload.php1,401 ▲134.21 ▼0.0198.70 ▼12.5952.49 ▲5.66

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/optingun/optingun.php:36

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: inline forms, optingun, leads, social signup, top bars...

optingun/optingun.php Passed 13 tests

The main file in "Optingun" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
This Plugin helps integrating Optingun forms into your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin234 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15057142
CSS10092

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.69
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
optingun_logo.png0.50KB0.88KB0.00%