93% plugin-activation-info

Code Review | Plugin Activation Info

WordPress plugin Plugin Activation Info scored 93% from 54 tests.

About plugin

  • Plugin page: plugin-activation...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3
  • WordPress version: 5.8.1
  • First release: Mar 21, 2018
  • Latest release: Oct 23, 2019
  • Number of updates: 6
  • Update frequency: every 96.8 days
  • Top authors: dnyanraja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 431 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼148.51ms] Passed 4 tests

Server-side resources used by Plugin Activation Info
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0232.56 ▼1.06
Dashboard /wp-admin3.08 ▲0.0351.67 ▲8.16
Posts /wp-admin/edit.php3.13 ▲0.0339.32 ▼3.58
Add New Post /wp-admin/post-new.php5.44 ▲0.0188.93 ▼589.30
Media Library /wp-admin/upload.php3.03 ▲0.0232.41 ▼0.10

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
pai_activated_plugins

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Activation Info
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.75 ▼0.139.08 ▲1.2446.50 ▼0.74
Dashboard /wp-admin2,970 ▲335.90 ▼0.01155.80 ▲14.61110.11 ▲4.22
Posts /wp-admin/edit.php2,736 ▼32.69 ▲0.0164.67 ▲1.5592.89 ▲5.49
Add New Post /wp-admin/post-new.php1,672 ▼1118.79 ▼0.02372.59 ▲0.23110.09 ▼0.46
Media Library /wp-admin/upload.php1,810 ▼05.01 ▼0.08143.22 ▼0.74112.48 ▼2.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/plugin-activation-info/plugin-activation-info.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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

plugin-activation-info/plugin-activation-info.php 77% from 13 tests

The main PHP file in "Plugin Activation Info" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected60 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3144860

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png49.58KB25.06KB▼ 49.46%