90% display-environment-type

Code Review | Display Environment Type

WordPress plugin Display Environment Type scored90%from 54 tests.

About plugin

  • Plugin page: display-environme...
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Aug 21, 2020
  • Latest release: Nov 10, 2023
  • Number of updates: 20
  • Update frequency: every 58.8 days
  • Top authors: roytanck (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /59,632 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Display Environment Type
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.61 ▼7.12
Dashboard /wp-admin3.33 ▼0.0143.69 ▼14.39
Posts /wp-admin/edit.php3.38 ▲0.0347.19 ▼1.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.58 ▼21.67
Media Library /wp-admin/upload.php3.25 ▲0.0334.11 ▲0.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Display Environment Type
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7414.54 ▲0.191.58 ▼0.1036.44 ▼5.53
Dashboard /wp-admin2,215 ▲385.58 ▼0.0983.35 ▼10.7539.37 ▼5.56
Posts /wp-admin/edit.php2,114 ▲111.98 ▲0.0337.75 ▼3.0536.34 ▼0.08
Add New Post /wp-admin/post-new.php1,533 ▲723.53 ▲0.32638.86 ▲6.7953.66 ▼2.08
Media Library /wp-admin/upload.php1,411 ▲84.21 ▲0.0698.36 ▲0.4141.85 ▲0.63

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: development, environment type, staging, dtap, production

display-environment-type/display-environment-type.php Passed 13 tests

"Display Environment Type" version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
48 characters long description:
Display the site's environment type in wp-admin.

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
Success! There were no dangerous files found in this plugin127 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3327879
CSS117348

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods888.89%
▷ Public methods777.78%
▷ Protected methods111.11%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin