10% dsubscribers

Code Review | DSubscribers

WordPress plugin DSubscribers scored10%from 54 tests.

About plugin

  • Plugin page: dsubscribers
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9
  • WordPress version: 6.3.1
  • First release: Jul 24, 2014
  • Latest release: May 3, 2018
  • Number of updates: 22
  • Update frequency: every 62.7 days
  • Top authors: dinamiko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,159 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/dsubscribers/includes/class-dsubscribers.php+51
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼59.23ms] Passed 4 tests

A check of server-side resources used by DSubscribers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.97 ▼36.96
Dashboard /wp-admin2.05 ▼1.307.76 ▼56.05
Posts /wp-admin/edit.php2.05 ▼1.317.05 ▼48.33
Add New Post /wp-admin/post-new.php2.05 ▼3.846.98 ▼95.57
Media Library /wp-admin/upload.php2.05 ▼1.187.31 ▼30.75
DSubscribers Settings /wp-admin/options-general.php?page=dsubscribers_settings2.057.06

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: 1 new table, 9 new options
New tables
wp_dsubscribers
New WordPress options
theysaidso_admin_options
dsubscribers_version
widget_dsubscribers_widget
jal_db_version
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for DSubscribers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.75 ▼0.628.76 ▲7.0339.00 ▼1.27
Dashboard /wp-admin2,226 ▲355.88 ▲0.03110.79 ▲8.3246.60 ▲2.03
Posts /wp-admin/edit.php2,106 ▲142.02 ▼0.0135.38 ▼4.4733.24 ▼0.27
Add New Post /wp-admin/post-new.php1,549 ▲3523.20 ▲5.54696.54 ▲6.3852.36 ▼2.22
Media Library /wp-admin/upload.php1,411 ▲264.21 ▼0.00109.55 ▲5.8347.30 ▲4.56
DSubscribers Settings /wp-admin/options-general.php?page=dsubscribers_settings8992.0325.7733.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/dsubscribers/includes/class-dsubscribers.php+51
    Function create_function() is deprecated
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_dsubscribers
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_dsubscribers_widget
    • dsubscribers_version
    • widget_theysaidso_widget
    • jal_db_version
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=dsubscribers_settings
    • > Deprecated in wp-content/plugins/dsubscribers/includes/class-dsubscribers.php+51
    Function create_function() is deprecated

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 items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dsubscribers/includes/class-dsubscribers-list-table.php on line 5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/dsubscribers/includes/class-dsubscribers-list-table.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/dsubscribers/includes/class-dsubscribers-list-table.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Subscribe form), #2 (Unsubscribe form), #3 (DSubscribers admin page), #4 (DSubscribers settings), #5 (DSubscribers widget)
The official readme.txt is a good inspiration

dsubscribers/dsubscribers.php Passed 13 tests

The main PHP script in "DSubscribers" version 1.2.1 is automatically included on every request by WordPress
43 characters long description:
Manage subscribers from your site with ease

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected950 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP645076768
JavaScript2621194
PO File1263368
CSS111420

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.00
▷ Minimum class complexity4.00
▷ Maximum class complexity37.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods54
▷ Static methods35.56%
▷ Public methods5296.30%
▷ Protected methods00.00%
▷ Private methods23.70%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.36MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png92.63KB32.03KB▼ 65.42%
screenshot-2.png37.85KB13.87KB▼ 63.36%
screenshot-3.png72.12KB23.45KB▼ 67.48%
screenshot-1.png38.41KB14.57KB▼ 62.07%
(invalid) screenshot-5.png129.31KB0.00KB▼ 100.00%