84% alertwire

Code Review | AlertWire

WordPress plugin AlertWire scored84%from 54 tests.

About plugin

  • Plugin page: alertwire
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 16, 2014
  • Latest release: Jan 6, 2017
  • Number of updates: 12
  • Update frequency: every 62.7 days
  • Top authors: AlertWire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /882 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.63ms] Passed 4 tests

A check of server-side resources used by AlertWire
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.96 ▼3.88
Dashboard /wp-admin3.33 ▲0.0348.80 ▼4.31
Posts /wp-admin/edit.php3.38 ▲0.0248.48 ▼0.66
Add New Post /wp-admin/post-new.php5.91 ▲0.02106.14 ▲16.31
Media Library /wp-admin/upload.php3.25 ▲0.0236.21 ▼1.66
AlertWire /wp-admin/options-general.php?page=alertwire3.2235.93

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

AlertWire: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.71 ▲0.391.98 ▼0.0143.09 ▲2.95
Dashboard /wp-admin2,196 ▲165.62 ▼0.0593.06 ▲4.2943.28 ▲1.51
Posts /wp-admin/edit.php2,107 ▲42.03 ▲0.0339.21 ▼1.5333.89 ▼7.58
Add New Post /wp-admin/post-new.php1,540 ▲1218.14 ▼4.81613.31 ▼30.0666.48 ▲4.12
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0196.57 ▼21.7543.87 ▼7.13
AlertWire /wp-admin/options-general.php?page=alertwire8332.0325.5927.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/alertwire/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/alertwire/alertwire.php:129

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === alertwire === )
  • Screenshots: Please add descriptions for these screenshots #1, #2 in alertwire/assets to your readme.txt
The official readme.txt might help

alertwire/alertwire.php Passed 13 tests

"AlertWire" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
AlertWire plug-in to easily insert script tag for AlertWire client sites.

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
Good job! No executable or dangerous file extensions detected114 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22051114

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin