73% alert-box-for-comments

Code Review | Alert box for comments

WordPress plugin Alert box for comments scored73%from 54 tests.

About plugin

  • Plugin page: alert-box-for-com...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 18, 2018
  • Latest release: Jun 18, 2018
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: elfiiik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /585 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Alert box for comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.65 ▼10.57
Dashboard /wp-admin3.35 ▲0.0449.59 ▼4.83
Posts /wp-admin/edit.php3.40 ▲0.0448.41 ▼1.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.10 ▼3.73
Media Library /wp-admin/upload.php3.27 ▲0.0437.73 ▼0.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
wp_answers
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Alert box for comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲4114.25 ▼0.101.66 ▼0.2238.77 ▼6.55
Dashboard /wp-admin2,210 ▲305.51 ▼0.0992.23 ▲1.8272.63 ▲27.16
Posts /wp-admin/edit.php2,115 ▲152.00 ▲0.0440.00 ▲1.8137.52 ▲2.24
Add New Post /wp-admin/post-new.php1,692 ▲15522.19 ▼1.20697.91 ▲19.3447.56 ▼8.85
Media Library /wp-admin/upload.php1,415 ▲124.22 ▲0.02101.30 ▲1.9874.67 ▲28.41

Uninstaller [IO: ▲0.00MB] [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
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_answers
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alert-box-for-comments/alert-box-v1.php:30

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)
There were no browser issues found

Optimizations

Plugin configuration 90% 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
4 plugin tags: responds, box, alert, comments

alert-box-for-comments/alert-box-v1.php 77% from 13 tests

"Alert box for comments" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alert-box-for-comments.php" instead of "alert-box-v1.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin248 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15625155
CSS117083
JavaScript13010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
No PNG files were detected