89% environment-displayer-for-pantheon

Code Review | Environment Displayer for Pantheon

WordPress plugin Environment Displayer for Pantheon scored89%from 54 tests.

About plugin

  • Plugin page: environment-displ...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Nov 18, 2022
  • Number of updates: 5
  • Update frequency: every 4.6 days
  • Top authors: rajinsharwar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /204 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼15.57ms] Passed 4 tests

Analyzing server-side resources used by Environment Displayer for Pantheon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0627.91 ▼14.06
Dashboard /wp-admin3.19 ▼0.1232.35 ▼18.07
Posts /wp-admin/edit.php3.25 ▼0.1036.87 ▼10.79
Add New Post /wp-admin/post-new.php5.44 ▼0.4573.92 ▼19.37
Media Library /wp-admin/upload.php3.20 ▼0.0328.96 ▼6.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Environment Displayer for Pantheon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.22 ▼1.141.75 ▼0.4244.41 ▲1.35
Dashboard /wp-admin2,215 ▲274.86 ▼0.99113.55 ▲1.6238.57 ▼3.19
Posts /wp-admin/edit.php2,101 ▲92.18 ▲0.1741.67 ▲3.6535.58 ▼0.25
Add New Post /wp-admin/post-new.php1,536 ▲723.16 ▲4.91674.74 ▲44.3055.10 ▲5.30
Media Library /wp-admin/upload.php1,397 ▲94.17 ▼0.0598.99 ▼8.0741.32 ▼4.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: pantheon hosting, pantheon

environment-displayer-for-pantheon/pantheon-environment-displayer.php 77% from 13 tests

The entry point to "Environment Displayer for Pantheon" version 1.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("environment-displayer-for-pantheon.php" instead of "pantheon-environment-displayer.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 195 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin25 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25825

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected