72% smsnotice

Code Review | SmsNotice

WordPress plugin SmsNotice scored72%from 54 tests.

About plugin

  • Plugin page: smsnotice
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jan 6, 2013
  • Latest release: May 3, 2013
  • Number of updates: 6
  • Update frequency: every 19.5 days
  • Top authors: walkbird (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /955 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼9.73ms] Passed 4 tests

A check of server-side resources used by SmsNotice
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.36 ▲0.81
Dashboard /wp-admin3.40 ▲0.1045.55 ▼4.25
Posts /wp-admin/edit.php3.51 ▲0.1647.59 ▼6.91
Add New Post /wp-admin/post-new.php5.98 ▲0.0979.99 ▼28.58
Media Library /wp-admin/upload.php3.32 ▲0.0934.83 ▲0.96
SmsNotice /wp-admin/plugins.php?page=smsnotice/SmsNotice.php3.2733.02

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

SmsNotice: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.74 ▲0.382.15 ▲0.5144.25 ▲4.94
Dashboard /wp-admin2,202 ▲255.59 ▼0.0681.79 ▼5.8539.70 ▼5.00
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0136.63 ▼5.0434.31 ▼3.44
Add New Post /wp-admin/post-new.php1,531 ▲323.28 ▲0.01646.59 ▲12.8750.78 ▲3.04
Media Library /wp-admin/upload.php1,404 ▲74.21 ▼0.0292.51 ▼7.7140.01 ▼2.67
SmsNotice /wp-admin/plugins.php?page=smsnotice/SmsNotice.php7932.0026.7532.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=smsnotice/SmsNotice.php
    • > Notice in wp-content/plugins/smsnotice/setting.php+5
    Undefined index: smsnotice_hidden
    • > GET request to /wp-admin/plugins.php?page=smsnotice/SmsNotice.php
    • > Notice in wp-content/plugins/smsnotice/SmsNotice.php+436
    Undefined index: smsnotice_phonenum_check_hidden
    • > GET request to /wp-admin/plugins.php?page=smsnotice/SmsNotice.php
    • > Notice in wp-content/plugins/smsnotice/SmsNotice.php+452
    Undefined index: smsnotice_condition_hidden
    • > GET request to /wp-admin/plugins.php?page=smsnotice/SmsNotice.php
    • > Notice in wp-content/plugins/smsnotice/SmsNotice.php+478
    Undefined index: smsnotice_verification_hidden

SRP 0% 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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/smsnotice/smsapi.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smsnotice/SmsNotice.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/smsnotice/setting.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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: fetion, sms, comments, notice, login

smsnotice/SmsNotice.php 92% from 13 tests

This is the main PHP file of "SmsNotice" version 0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smsnotice.php" instead of "SmsNotice.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
Good job! No executable or dangerous file extensions detected567 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6159160567

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods330.00%
▷ Protected methods770.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 files were detected