84% recommend-by-mail-widget

Code Review | Recommend by mail widget

WordPress plugin Recommend by mail widget scored 84% from 54 tests.

About plugin

  • Plugin page: recommend-by-mail...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 8, 2017
  • Latest release: Jan 12, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: sojahu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 633 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.93ms] Passed 4 tests

An overview of server-side resources used by Recommend by mail widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.58 ▼3.63
Dashboard /wp-admin3.35 ▲0.0458.28 ▲12.30
Posts /wp-admin/edit.php3.40 ▲0.0447.88 ▼2.92
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.51 ▼8.20
Media Library /wp-admin/upload.php3.27 ▲0.0436.99 ▲3.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Recommend by mail widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.45 ▲0.201.89 ▲0.1340.24 ▼7.22
Dashboard /wp-admin2,209 ▲185.76 ▲0.89101.51 ▼0.9838.44 ▼6.28
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0239.34 ▼10.5535.13 ▼9.88
Add New Post /wp-admin/post-new.php1,548 ▲618.45 ▲0.30584.77 ▼33.9089.29 ▲31.89
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.0694.62 ▼6.6441.61 ▼6.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recommend_by_mail_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommend-by-mail-widget/recommend-by-mail-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Widget UI), #2 (Widget result in sidebar)
The official readme.txt might help

recommend-by-mail-widget/recommend-by-mail-widget.php Passed 13 tests

This is the main PHP file of "Recommend by mail widget" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
Recommend the site or the current page to a friend by mail.

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
No dangerous file extensions were detected179 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1519127
PO File1335852

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png11.60KB4.80KB▼ 58.62%
screenshot-1.png31.46KB10.73KB▼ 65.90%