84% wp-dev-flag

Code Review | WP Dev Flag

WordPress plugin WP Dev Flag scored84%from 54 tests.

About plugin

  • Plugin page: wp-dev-flag
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2019
  • Latest release: Dec 1, 2022
  • Number of updates: 33
  • Update frequency: every 40.3 days
  • Top authors: chrisjallen (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,413 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.53ms] Passed 4 tests

Server-side resources used by WP Dev Flag
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.23 ▼0.88
Dashboard /wp-admin3.45 ▲0.1448.76 ▼0.14
Posts /wp-admin/edit.php3.56 ▲0.2050.04 ▼4.01
Add New Post /wp-admin/post-new.php6.05 ▲0.1689.85 ▼9.07
Media Library /wp-admin/upload.php3.37 ▲0.1438.39 ▲3.19
WP Dev Flag Options /wp-admin/plugins.php?page=wp_dev_flag_options3.4335.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
wp_dev_flag_display_options

Browser metrics Passed 4 tests

WP Dev Flag: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲3114.29 ▼0.311.86 ▼0.0443.49 ▲3.85
Dashboard /wp-admin2,220 ▲405.81 ▲0.1695.18 ▲0.6240.96 ▲1.85
Posts /wp-admin/edit.php2,112 ▲92.31 ▲0.3337.07 ▲1.4436.82 ▲4.67
Add New Post /wp-admin/post-new.php1,552 ▲2623.02 ▼0.10685.65 ▼6.8037.89 ▼26.32
Media Library /wp-admin/upload.php1,435 ▲384.27 ▲0.09102.09 ▼1.5646.13 ▼1.73
WP Dev Flag Options /wp-admin/plugins.php?page=wp_dev_flag_options8711.8330.9632.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-dev-flag/admin/partials/wp-dev-flag-admin-display.php

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: dev, banner, development, flag, production...

wp-dev-flag/wp-dev-flag.php Passed 13 tests

The main PHP file in "WP Dev Flag" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
103 characters long description:
Shows a floating badge on the front end, to visually distinguish your development site from production.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected719 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11257677529
JavaScript2263199
Markdown129054
CSS18437

PHP code Passed 2 tests

Analyzing 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.18
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods4189.13%
▷ Protected methods00.00%
▷ Private methods510.87%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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