80% pay-post-by-sms

Code Review | Pay Post By SMS

WordPress plugin Pay Post By SMS scored80%from 54 tests.

About plugin

  • Plugin page: pay-post-by-sms
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Dec 5, 2017
  • Latest release: Jan 9, 2018
  • Number of updates: 14
  • Update frequency: every 2.9 days
  • Top authors: onlinesolutionsbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /749 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Pay Post By SMS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.05 ▼4.61
Dashboard /wp-admin3.31 ▼0.0446.01 ▼17.06
Posts /wp-admin/edit.php3.36 ▲0.0048.50 ▼10.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.90 ▼29.55
Media Library /wp-admin/upload.php3.23 ▲0.0037.14 ▼0.83

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Pay Post By SMS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.20 ▼0.152.02 ▲0.1942.71 ▼3.74
Dashboard /wp-admin2,192 ▲155.52 ▼0.0888.84 ▲3.0035.95 ▼7.38
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0139.61 ▼1.1235.72 ▼2.86
Add New Post /wp-admin/post-new.php1,526 ▼223.79 ▲0.76669.44 ▲36.9951.59 ▼0.91
Media Library /wp-admin/upload.php1,397 ▼34.13 ▼0.05110.08 ▲11.2846.52 ▲1.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstaller has failed for this plugin, leaving 25 files (0.22MB) in the plugin directory
    • (new file) admin/security_settings.php
    • (new file) assets/img/clickatell.png
    • (new file) admin/sms_settings.php
    • (new file) assets/img/dashboard_icon.png
    • (new file) LICENSE.txt
    • (new file) admin/instructions.php
    • (new file) assets/css/pay_post_by_sms.css
    • (new file) api/rest.php
    • (new file) assets/img/centili.png
    • (new file) admin/api_url_settings.php
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 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
9 plugin tags: premium sms, sms, payment, charge per post, micro payments...

pay-post-by-sms/pay-post-by-sms.php Passed 13 tests

The main file in "Pay Post By SMS" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
15 characters long description:
Pay Post By SMS

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 detected821 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7484158624
PO File17183187
JavaScript18010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity22.00
▷ Minimum class complexity7.00
▷ Maximum class complexity48.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods49.76%
▷ Public methods3585.37%
▷ Protected methods00.00%
▷ Private methods614.63%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/nth-mobile.png6.50KB3.30KB▼ 49.20%
assets/img/clickatell.png10.13KB4.44KB▼ 56.15%
assets/img/fortumo.png7.46KB3.42KB▼ 54.18%
assets/img/ticket.png18.17KB4.24KB▼ 76.69%
assets/img/dashboard_icon.png2.31KB1.47KB▼ 36.38%