88% wp-ajax-subscribe

Code Review | WP Ajax Subscribe

WordPress plugin WP Ajax Subscribe scored 88% from 54 tests.

About plugin

  • Plugin page: wp-ajax-subscribe
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9
  • WordPress version: 5.8.1
  • First release: Mar 22, 2019
  • Latest release: Mar 23, 2019
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: silwal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 314 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼150.06ms] Passed 4 tests

This is a short check of server-side resources used by WP Ajax Subscribe
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0838.70 ▼7.95
Dashboard /wp-admin3.13 ▲0.0755.47 ▼21.20
Posts /wp-admin/edit.php3.24 ▲0.1253.64 ▼8.06
Add New Post /wp-admin/post-new.php5.48 ▲0.0594.05 ▼563.02
Media Library /wp-admin/upload.php3.07 ▲0.0743.18 ▲5.58

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Ajax Subscribe
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲20716.30 ▲0.6513.71 ▲0.6251.06 ▼9.84
Dashboard /wp-admin2,989 ▲556.07 ▲0.06159.63 ▼8.68137.96 ▲11.39
Posts /wp-admin/edit.php2,758 ▲192.83 ▲0.1375.35 ▼9.38101.97 ▲4.94
Add New Post /wp-admin/post-new.php1,697 ▲1418.06 ▼0.38418.38 ▼79.23118.28 ▲7.28
Media Library /wp-admin/upload.php1,829 ▲225.04 ▲0.02164.29 ▼10.85123.41 ▲0.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-ajax-subscribe/public/partials/wp-ajax-subscribe-public-display.php
    • > /wp-content/plugins/wp-ajax-subscribe/admin/partials/wp-ajax-subscribe-admin-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-ajax-subscribe/custom-function/custom-function.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-ajax-subscribe/custom-function/wp-ajax-subscribe-menu.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Donate link: Invalid url: ""
The official readme.txt might help

wp-ajax-subscribe/wp-ajax-subscribe.php Passed 13 tests

The primary PHP file in "WP Ajax Subscribe" version 1.1.1 is used by WordPress to initiate all plugin functionality
55 characters long description:
Simply add subscribers to MailChimp lists in one click.

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
Success! There were no dangerous files found in this plugin387 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14125541312
CSS23839
JavaScript245436

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin