72% wp-simple-subscriber

Code Review | WP Simple Subscriber

WordPress plugin WP Simple Subscriber scored72%from 54 tests.

About plugin

  • Plugin page: wp-simple-subscriber
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: May 19, 2015
  • Latest release: Sep 11, 2015
  • Number of updates: 5
  • Update frequency: every 23.0 days
  • Top authors: sdellow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,712 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.04MB] [CPU: ▼15.70ms] Passed 4 tests

Analyzing server-side resources used by WP Simple Subscriber
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1645.03 ▲5.07
Dashboard /wp-admin3.32 ▲0.0238.88 ▼16.88
Posts /wp-admin/edit.php3.39 ▲0.0438.45 ▼15.55
Add New Post /wp-admin/post-new.php5.57 ▼0.3176.64 ▼35.45
Media Library /wp-admin/upload.php3.33 ▲0.1039.46 ▲6.03
Subscriber /wp-admin/edit.php?post_type=wpsssubscribers3.3735.86
Options /wp-admin/edit.php?post_type=wpsssubscribers&page=WPSS_plugin_options3.3034.57
Add New /wp-admin/post-new.php?post_type=wpsssubscribers3.3641.14

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Simple Subscriber
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.75 ▼0.551.92 ▲0.1844.92 ▲2.52
Dashboard /wp-admin2,238 ▲585.63 ▲0.01104.27 ▲12.8845.48 ▲3.02
Posts /wp-admin/edit.php2,155 ▲552.63 ▲0.6139.32 ▲1.4534.15 ▼4.45
Add New Post /wp-admin/post-new.php1,567 ▲2218.03 ▼5.03687.34 ▲83.3238.66 ▼8.33
Media Library /wp-admin/upload.php1,458 ▲585.10 ▲0.92105.97 ▼3.5345.51 ▲0.37
Subscriber /wp-admin/edit.php?post_type=wpsssubscribers1,2072.5638.0332.44
Options /wp-admin/edit.php?post_type=wpsssubscribers&page=WPSS_plugin_options9342.2134.3232.48
Add New /wp-admin/post-new.php?post_type=wpsssubscribers1,5583.3959.2034.87

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpsssubscribers
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/edit.php?post_type=wpsssubscribers&page=WPSS_plugin_options
    • > Deprecated in wp-content/plugins/wp-simple-subscriber/controllers/dashboard.php+73
    Non-static method WPSS\Views\Dashboard::fetch() should not be called statically
    • > GET request to /wp-admin/edit.php?post_type=wpsssubscribers&page=WPSS_plugin_options
    • > Deprecated in wp-content/plugins/wp-simple-subscriber/views/dashboard.php+32
    Non-static method WPSS\Views\Dashboard::template() should not be called statically

SRP 0% 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
The following issues need your attention
  • 15× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-simple-subscriber/models/csv.php
    • > /wp-content/plugins/wp-simple-subscriber/functions/actions.php
    • > /wp-content/plugins/wp-simple-subscriber/functions/misc.php
    • > /wp-content/plugins/wp-simple-subscriber/autoloader.php
    • > /wp-content/plugins/wp-simple-subscriber/models/subscriber.php
    • > /wp-content/plugins/wp-simple-subscriber/controllers/dashboard.php
    • > /wp-content/plugins/wp-simple-subscriber/views/dashboard.php
    • > /wp-content/plugins/wp-simple-subscriber/functions/channels.php
    • > /wp-content/plugins/wp-simple-subscriber/controllers/posttypes.php
    • > /wp-content/plugins/wp-simple-subscriber/controllers/activation.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-simple-subscriber/uninstall.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
10 plugin tags: easy, campaign monitor, simple, subscribers, dot mailer...

wp-simple-subscriber/wp-simple-subscriber.php 85% from 13 tests

"WP Simple Subscriber" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 285 characters long)

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
There were no executable files found in this plugin1,847 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS240521,202
PHP17129581623
JavaScript262122

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity3.75
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods17
▷ Static methods529.41%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
Constants14
▷ Global constants14100.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
No PNG images were found in this plugin