83% wangguard-wysija-newsletter-connector

Code Review | WangGuard - MailPoet Connector

WordPress plugin WangGuard - MailPoet Connector scored83%from 54 tests.

About plugin

  • Plugin page: wangguard-wysija-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Apr 23, 2014
  • Number of updates: 14
  • Update frequency: every 34.9 days
  • Top authors: j.conti (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.32ms] Passed 4 tests

This is a short check of server-side resources used by WangGuard - MailPoet Connector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.30 ▼7.13
Dashboard /wp-admin3.32 ▲0.0247.94 ▼2.26
Posts /wp-admin/edit.php3.37 ▲0.0148.11 ▲1.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.28 ▼0.07
Media Library /wp-admin/upload.php3.24 ▲0.0134.18 ▲0.18

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WangGuard - MailPoet Connector
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10813.18 ▼1.201.87 ▲0.1240.28 ▼7.94
Dashboard /wp-admin2,224 ▲364.86 ▼0.04105.21 ▼7.8244.16 ▲0.63
Posts /wp-admin/edit.php2,104 ▲152.05 ▲0.0433.88 ▼8.3333.79 ▼0.40
Add New Post /wp-admin/post-new.php1,551 ▲1823.34 ▲0.16590.33 ▲3.8558.60 ▼4.18
Media Library /wp-admin/upload.php1,409 ▲184.27 ▲0.0797.91 ▼3.8841.41 ▼6.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% 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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wangguard-wysija-newsletter-connector/wangguard-wysija.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

wangguard-wysija-newsletter-connector/wangguard-wysija.php 85% from 13 tests

"WangGuard - MailPoet Connector" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 427 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wangguard-wysija-newsletter-connector.php" instead of "wangguard-wysija.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1143442

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.71
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin