73% invisible-optin

Code Review | Invisible Optin

WordPress plugin Invisible Optin scored73%from 54 tests.

About plugin

  • Plugin page: invisible-optin
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.0
  • WordPress version: 6.3.1
  • First release: Apr 14, 2014
  • Latest release: Jan 27, 2015
  • Number of updates: 14
  • Update frequency: every 20.7 days
  • Top authors: OffClicks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,954 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 gracefully, with no errors

Server metrics [RAM: ▼0.94MB] [CPU: ▼40.53ms] Passed 4 tests

An overview of server-side resources used by Invisible Optin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.67 ▼1.38
Dashboard /wp-admin3.01 ▼0.3427.70 ▼43.03
Posts /wp-admin/edit.php3.01 ▼0.3525.09 ▼30.16
Add New Post /wp-admin/post-new.php3.01 ▼2.8828.36 ▼77.56
Media Library /wp-admin/upload.php3.01 ▼0.2226.93 ▼11.37

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_invisible_optin_settings
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
invisible_optin_db_version
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Invisible Optin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7015.24 ▲0.881.83 ▲0.2139.93 ▲0.58
Dashboard /wp-admin2,237 ▲576.67 ▲1.07117.91 ▲31.2083.78 ▲43.11
Posts /wp-admin/edit.php2,313 ▲2133.65 ▲1.7056.89 ▲18.8466.95 ▲28.24
Add New Post /wp-admin/post-new.php1,573 ▲4723.19 ▼0.28685.04 ▲6.56167.36 ▲106.95
Media Library /wp-admin/upload.php1,607 ▲2045.40 ▲1.29126.37 ▲15.3385.42 ▲34.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • invisible_optin_db_version
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invisible-optin/invisible_optin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/invisible-optin/invisible_optin_header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invisible-optin/invisible_optin_settings.php:4

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === invisible-optin === )
The official readme.txt might help

invisible-optin/invisible_optin.php 85% from 13 tests

The primary PHP file in "Invisible Optin" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("invisible-optin.php" instead of "invisible_optin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected201 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35314200
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/invisible-optin-logo.png2.22KB2.21KB▼ 0.57%