10% vervemail-subscribe

Code Review | Vervemail Subscriber

WordPress plugin Vervemail Subscriber scored10%from 54 tests.

About plugin

  • Plugin page: vervemail-subscribe
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.1
  • WordPress version: 6.3.1
  • First release: Mar 13, 2017
  • Latest release: Dec 21, 2017
  • Number of updates: 16
  • Update frequency: every 17.4 days
  • Top authors: vervemail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /550 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/vervemail-subscribe/main.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_vervemail has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼57.53ms] Passed 4 tests

Server-side resources used by Vervemail Subscriber
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.64 ▼34.76
Dashboard /wp-admin2.17 ▼1.135.86 ▼48.74
Posts /wp-admin/edit.php2.17 ▼1.186.27 ▼49.14
Add New Post /wp-admin/post-new.php2.17 ▼3.717.23 ▼97.48
Media Library /wp-admin/upload.php2.17 ▼1.066.23 ▼33.09

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_wp_vervemail
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Vervemail Subscriber
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.57 ▼0.7912.86 ▲10.9843.48 ▲1.41
Dashboard /wp-admin2,195 ▲215.59 ▲0.0288.76 ▼6.8242.88 ▼4.53
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0139.15 ▼0.8337.22 ▲0.69
Add New Post /wp-admin/post-new.php1,526 ▼023.01 ▼0.08682.54 ▲5.6852.30 ▼30.26
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.05108.02 ▲4.4343.90 ▼1.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/vervemail-subscribe/main.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_vervemail has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_wp_vervemail
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/vervemail-subscribe/thanks-modal.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vervemail-subscribe/main.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: sign up, subscribe, register, widget, vervemail

vervemail-subscribe/main.php 92% from 13 tests

The main file in "Vervemail Subscriber" v. 2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("vervemail-subscribe.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected916 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP317928612
CSS178291
JavaScript271613

PHP code Passed 2 tests

An short overview of 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.10
Average class complexity17.00
▷ Minimum class complexity13.00
▷ Maximum class complexity21.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods54
▷ Static methods00.00%
▷ Public methods4990.74%
▷ Protected methods00.00%
▷ Private methods59.26%
Functions1
▷ Named functions1100.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 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/close.png1.88KB1.13KB▼ 40.09%