89% subme

Code Review | SubMe

WordPress plugin SubMe scored89%from 54 tests.

About plugin

  • Plugin page: subme
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 5, 2014
  • Latest release: May 26, 2015
  • Number of updates: 27
  • Update frequency: every 16.2 days
  • Top authors: supongo (81.48%)SubscribeMe (22.22%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /6,752 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▲2.14ms] Passed 4 tests

Server-side resources used by SubMe
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3443.82 ▲8.14
Dashboard /wp-admin3.66 ▲0.3549.61 ▲1.22
Posts /wp-admin/edit.php3.77 ▲0.4149.65 ▲3.29
Add New Post /wp-admin/post-new.php6.26 ▲0.3793.89 ▲2.09
Media Library /wp-admin/upload.php3.58 ▲0.3537.95 ▲1.94
Subscribers /wp-admin/admin.php?page=sm_subscribers3.6438.33
Settings /wp-admin/admin.php?page=sm_settings3.8834.20
Queue /wp-admin/admin.php?page=sm_queue3.6537.24

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: 2 new tables, 7 new options
New tables
wp_subme_queue
wp_subme
New WordPress options
subme_options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for SubMe
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.10 ▼0.271.81 ▼0.0443.88 ▲4.28
Dashboard /wp-admin2,228 ▲515.50 ▼0.1681.97 ▼4.4245.42 ▲0.60
Posts /wp-admin/edit.php2,133 ▲332.04 ▲0.0732.99 ▼2.7841.06 ▲4.91
Add New Post /wp-admin/post-new.php1,554 ▲2623.31 ▲0.26666.56 ▲59.1761.08 ▲7.97
Media Library /wp-admin/upload.php1,436 ▲364.19 ▼0.0097.00 ▼9.9646.31 ▼0.94
Subscribers /wp-admin/admin.php?page=sm_subscribers1,0712.0026.6433.49
Settings /wp-admin/admin.php?page=sm_settings1,2222.0324.9423.82
Queue /wp-admin/admin.php?page=sm_queue9852.0324.0725.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

subme/subme.php 92% from 13 tests

The principal PHP file in "SubMe" v. 2.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin4,260 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP77116293,779
PO File1161388407
JavaScript110073
CSS1001

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 200)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity173.00
▷ Minimum class complexity18.00
▷ Maximum class complexity463.00
Average method complexity8.27
▷ Minimum method complexity1.00
▷ Maximum method complexity200.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods6287.32%
▷ Protected methods79.86%
▷ Private methods22.82%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected