68% subscriptiondna

Code Review | Subscription DNA®

WordPress plugin Subscription DNA® scored 68% from 54 tests.

About plugin

  • Plugin page: subscriptiondna
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 2, 2014
  • Latest release: Sep 8, 2021
  • Number of updates: 75
  • Update frequency: every 55.0 days
  • Top authors: subscriptiondna (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 3,321 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.93MB] [CPU: ▼37.25ms] Passed 4 tests

A check of server-side resources used by Subscription DNA®
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.13 ▲1.37
Dashboard /wp-admin3.02 ▼0.2924.95 ▼25.44
Posts /wp-admin/edit.php3.02 ▼0.3427.84 ▼24.06
Add New Post /wp-admin/post-new.php3.02 ▼2.8726.05 ▼82.20
Media Library /wp-admin/upload.php3.02 ▼0.2122.91 ▼17.30

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Subscription DNA®: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.31 ▼1.071.69 ▼0.1239.67 ▼0.81
Dashboard /wp-admin2,222 ▲395.87 ▲0.94108.45 ▼1.9938.30 ▼9.52
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0440.63 ▼1.9036.11 ▲0.75
Add New Post /wp-admin/post-new.php1,555 ▲2118.10 ▼5.42609.72 ▼40.9247.65 ▼5.62
Media Library /wp-admin/upload.php1,404 ▲164.18 ▼0.0698.05 ▼2.0342.89 ▼3.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/subscriptiondna/dna_header.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: logo_no_margin in wp-content/plugins/subscriptiondna/dna_header.php on line 4

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (30 tag instead of maximum 10)
The official readme.txt might help

subscriptiondna/dna.php 92% from 13 tests

This is the main PHP file of "Subscription DNA®" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("subscriptiondna.php" instead of "dna.php")

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 plugin215 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23335215

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png11.35KB5.93KB▼ 47.71%