84% elegant-subscription-popup

Code Review | Elegant Subscription Popup

WordPress plugin Elegant Subscription Popup scored84%from 54 tests.

About plugin

  • Plugin page: elegant-subscript...
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 23, 2014
  • Latest release: Feb 4, 2017
  • Number of updates: 27
  • Update frequency: every 28.7 days
  • Top authors: shrinitech (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /20,661 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Elegant Subscription Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.27 ▼2.43
Dashboard /wp-admin3.33 ▲0.0343.47 ▼6.71
Posts /wp-admin/edit.php3.39 ▲0.0342.71 ▼0.58
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.74 ▼11.85
Media Library /wp-admin/upload.php3.25 ▲0.0332.71 ▼4.41
Elegant Subscription Popup /wp-admin/options-general.php?page=elegant-subscription-form-settings3.2331.15

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
elegant_subscription_form_settings
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Elegant Subscription Popup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲23013.58 ▼0.659.73 ▲8.0342.43 ▼0.27
Dashboard /wp-admin2,223 ▲455.84 ▲0.1684.90 ▼17.7637.63 ▼6.16
Posts /wp-admin/edit.php2,120 ▲172.42 ▲0.3839.57 ▲2.9631.17 ▼4.76
Add New Post /wp-admin/post-new.php1,547 ▲2123.70 ▲0.81682.75 ▲12.3839.54 ▼17.27
Media Library /wp-admin/upload.php1,432 ▲324.45 ▲0.17103.71 ▼5.6743.05 ▼4.70
Elegant Subscription Popup /wp-admin/options-general.php?page=elegant-subscription-form-settings1,3344.53118.4864.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/elegant-subscription-popup/elegant-subscription-popup.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

elegant-subscription-popup/elegant-subscription-popup.php 92% from 13 tests

The principal PHP file in "Elegant Subscription Popup" v. 1.7.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 233 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,651 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS3551143,062
PHP312949443
SVG10097
JavaScript216149

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.50
▷ Minimum class complexity9.00
▷ Maximum class complexity14.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/close.png0.20KB0.21KB0.00%