84% inactive-tab-message

Code Review | Inactive Tab Messages

WordPress plugin Inactive Tab Messages scored84%from 54 tests.

About plugin

  • Plugin page: inactive-tab-message
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 6, 2020
  • Latest release: Aug 4, 2020
  • Number of updates: 7
  • Update frequency: every 4.6 days
  • Top authors: turbocro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /401 total downloads

Benchmarks

Plugin footprint 83% 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.07MB] [CPU: ▼1.99ms] Passed 4 tests

Server-side resources used by Inactive Tab Messages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.68 ▼10.74
Dashboard /wp-admin3.38 ▲0.0755.89 ▲5.64
Posts /wp-admin/edit.php3.49 ▲0.1353.38 ▲5.44
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.33 ▼5.49
Media Library /wp-admin/upload.php3.30 ▲0.0738.48 ▲2.85
Inactive Tab Messages /wp-admin/tools.php?page=inactive-tab-messages3.2731.43

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
inactive-tab-messages

Browser metrics Passed 4 tests

Checking browser requirements for Inactive Tab Messages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.34 ▼0.211.85 ▲0.1245.50 ▲1.40
Dashboard /wp-admin2,202 ▲285.62 ▼0.0685.80 ▼7.1937.70 ▼3.06
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0536.13 ▼3.0733.33 ▼5.94
Add New Post /wp-admin/post-new.php1,531 ▲523.10 ▼0.13669.56 ▼15.5057.25 ▼1.84
Media Library /wp-admin/upload.php1,404 ▲14.18 ▲0.0597.02 ▼16.7140.96 ▼10.70
Inactive Tab Messages /wp-admin/tools.php?page=inactive-tab-messages7922.0323.9825.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • inactive-tab-messages

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/inactive-tab-message/admin/partials/inactive-tab-messages-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: inactive tab, tab

inactive-tab-message/inactive-tab-messages.php 85% from 13 tests

"Inactive Tab Messages" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("inactive-tab-message.php" instead of "inactive-tab-messages.php")

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
There were no executable files found in this plugin306 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11163549297
JavaScript1309

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin