83% show-apache-and-php-version

Code Review | Show Apache and PHP version

WordPress plugin Show Apache and PHP version scored83%from 54 tests.

About plugin

  • Plugin page: show-apache-and-p...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 21, 2020
  • Latest release: Feb 21, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: pedjas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /501 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.35ms] Passed 4 tests

A check of server-side resources used by Show Apache and PHP version
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.38 ▼2.72
Dashboard /wp-admin3.32 ▼0.0346.55 ▼20.45
Posts /wp-admin/edit.php3.37 ▲0.0151.56 ▲3.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.56 ▼14.13
Media Library /wp-admin/upload.php3.24 ▲0.0139.14 ▲4.36

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Show Apache and PHP version
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.56 ▲0.272.10 ▲0.1450.69 ▲6.42
Dashboard /wp-admin2,192 ▲185.59 ▼0.0887.43 ▼12.2639.24 ▼8.01
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0237.24 ▲1.9632.43 ▼6.93
Add New Post /wp-admin/post-new.php1,545 ▼023.43 ▲0.23673.16 ▼9.5662.65 ▲2.02
Media Library /wp-admin/upload.php1,400 ▲34.15 ▼0.09110.55 ▼8.6748.65 ▼1.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/show-apache-and-php-version/show-apache-php-version.php:52

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 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: footer, admin, version, apache, php...

show-apache-and-php-version/show-apache-php-version.php 69% from 13 tests

The main PHP file in "Show Apache and PHP version" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path should use only dashes and lowercase characters ("")
  • Domain Path: Prefix the domain path with a forward slash character ("/")
  • 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
  • Main file name: Name the main plugin file the same as the plugin slug ("show-apache-and-php-version.php" instead of "show-apache-php-version.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin43 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2317843

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity2.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin