78% totalsend-integration

Code Review | TotalSend WordPress Integration

WordPress plugin TotalSend WordPress Integration scored78%from 54 tests.

About plugin

  • Plugin page: totalsend-integra...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.3
  • WordPress version: 6.3.1
  • First release: May 8, 2014
  • Latest release: Sep 16, 2019
  • Number of updates: 10
  • Update frequency: every 195.8 days
  • Top authors: totalsend (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /969 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼5.24ms] Passed 4 tests

Analyzing server-side resources used by TotalSend WordPress Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1844.57 ▲1.17
Dashboard /wp-admin3.48 ▲0.1744.68 ▼7.41
Posts /wp-admin/edit.php3.59 ▲0.2349.33 ▲0.24
Add New Post /wp-admin/post-new.php6.08 ▲0.1982.80 ▼14.97
Media Library /wp-admin/upload.php3.40 ▲0.1736.68 ▲2.72
TotalSend Integration /wp-admin/options-general.php?page=totalsend-subscribe3.3733.52

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
totalsend-subs
widget_theysaidso_widget
widget_recent-posts
widget_ts_subscribe
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by TotalSend WordPress Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.59 ▼0.725.78 ▲4.0838.49 ▼8.07
Dashboard /wp-admin2,212 ▲275.86 ▼0.0497.66 ▼1.4439.08 ▼5.94
Posts /wp-admin/edit.php2,101 ▲122.03 ▲0.0434.79 ▼0.3929.45 ▼5.01
Add New Post /wp-admin/post-new.php1,539 ▲1123.09 ▲4.77646.82 ▼24.5462.05 ▲10.35
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0394.00 ▼13.7640.68 ▼6.69
TotalSend Integration /wp-admin/options-general.php?page=totalsend-subscribe9341.7931.1730.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_ts_subscribe
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/totalsend-integration/totalsend_subscribe.php on line 24
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/totalsend-integration/totalsend_subscribe.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/totalsend-integration/totalsend_subscribe.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=totalsend-subscribe
    • > Network (severe)
    https://77fd076ee376409e7cdf45b674315ad16b51a2f9.googledrive.com/host/0B3ve0VXYPb3DX0FGTXhuTVBueTQ/ts_sig_logo.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: totalsend, subscribe, email newsletters, newsletters

totalsend-integration/totalsend_subscribe.php 85% from 13 tests

The principal PHP file in "TotalSend WordPress Integration" v. 1.0.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("totalsend-integration.php" instead of "totalsend_subscribe.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,068 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1157751,024
JavaScript17844

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity33.50
▷ Minimum class complexity13.00
▷ Maximum class complexity56.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods1744.74%
▷ Public methods3284.21%
▷ Protected methods00.00%
▷ Private methods615.79%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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