89% envs-switcher

Code Review | Envs Switcher

WordPress plugin Envs Switcher scored89%from 54 tests.

About plugin

  • Plugin page: envs-switcher
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Jun 18, 2016
  • Latest release: Mar 2, 2017
  • Number of updates: 24
  • Update frequency: every 13.3 days
  • Top authors: webstartup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /632 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.44ms] Passed 4 tests

Analyzing server-side resources used by Envs Switcher
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.99 ▼6.69
Dashboard /wp-admin3.41 ▲0.0749.76 ▼16.75
Posts /wp-admin/edit.php3.53 ▲0.1754.45 ▲0.13
Add New Post /wp-admin/post-new.php5.99 ▲0.1189.91 ▼6.43
Media Library /wp-admin/upload.php3.34 ▲0.1142.75 ▲5.54

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/envs-switcher/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 13 new files
Database: no new tables, 14 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
slwsu_envs_switcher_test
slwsu_envs_switcher_demonstration
widget_recent-comments
slwsu_envs_switcher_environement
widget_theysaidso_widget
slwsu_envs_switcher_grouper
slwsu_envs_switcher_production
...

Browser metrics Passed 4 tests

An overview of browser requirements for Envs Switcher
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8313.64 ▼0.731.60 ▼0.3338.61 ▼2.80
Dashboard /wp-admin2,239 ▲365.79 ▲0.94111.44 ▲1.1443.45 ▲2.24
Posts /wp-admin/edit.php2,118 ▲182.06 ▲0.0440.50 ▼1.1835.72 ▲1.80
Add New Post /wp-admin/post-new.php1,562 ▲1723.41 ▲0.33660.64 ▲0.7157.55 ▲4.14
Media Library /wp-admin/upload.php1,421 ▲184.20 ▼0.00103.41 ▲0.5742.08 ▼0.07

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Activate the plugin), #2 (Click Settings to change the predefined configuration.), #3 (Fill out the details of seized and validate.), #4 (The button should normally be functional.)
You can take inspiration from this readme.txt

envs-switcher/envs-switcher.php 92% from 13 tests

The main file in "Envs Switcher" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected694 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9122170563
PO File14949131

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods44
▷ Static methods1329.55%
▷ Public methods3988.64%
▷ Protected methods00.00%
▷ Private methods511.36%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin