83% environment-info

Code Review | Environment Info

WordPress plugin Environment Info scored83%from 54 tests.

About plugin

  • Plugin page: environment-info
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2020
  • Latest release: Feb 23, 2023
  • Number of updates: 6
  • Update frequency: every 183.2 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.07ms] Passed 4 tests

A check of server-side resources used by Environment Info
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.31 ▼3.58
Dashboard /wp-admin3.34 ▲0.0356.30 ▲4.14
Posts /wp-admin/edit.php3.39 ▲0.0354.55 ▲0.58
Add New Post /wp-admin/post-new.php5.92 ▲0.03105.77 ▲4.39
Media Library /wp-admin/upload.php3.26 ▲0.0337.87 ▼0.85
Environment Info /wp-admin/tools.php?page=environment_info3.2235.19

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Environment Info
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8614.35 ▼0.292.00 ▼0.2749.75 ▲1.89
Dashboard /wp-admin2,220 ▲325.86 ▲0.96122.20 ▲7.5747.92 ▲8.79
Posts /wp-admin/edit.php2,103 ▲111.98 ▼0.0442.08 ▲2.5542.57 ▲6.49
Add New Post /wp-admin/post-new.php1,544 ▲1123.13 ▼0.11671.92 ▼23.6961.14 ▲6.75
Media Library /wp-admin/upload.php1,405 ▲174.21 ▲0.00111.79 ▼1.3349.27 ▲3.64
Environment Info /wp-admin/tools.php?page=environment_info7952.0129.5232.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • 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
Everything seems fine, however 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
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 Palasthotel\\WordPress\\EnvironmentInfo\\add_filter() in wp-content/plugins/environment-info/plugin.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: admin bar, information, dashboard

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

The principal PHP file in "Environment Info" v. 1.1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.0.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("environment-info.php" instead of "plugin.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 plugin160 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12657135
Markdown15025

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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
Namespaces1
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin