89% php-info-wp

Code Review | PHP Info

WordPress plugin PHP Info scored 89% from 54 tests.

About plugin

  • Plugin page: php-info-wp
  • Plugin version: 1.0.3
  • PHP compatiblity: 8.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 6, 2017
  • Latest release: Dec 5, 2020
  • Number of updates: 18
  • Update frequency: every 60.8 days
  • Top authors: pbimal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 23,999 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.01MB] [CPU: ▼4.61ms] Passed 4 tests

An overview of server-side resources used by PHP Info
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.34 ▼0.99
Dashboard /wp-admin3.32 ▲0.0246.21 ▼2.78
Posts /wp-admin/edit.php3.37 ▲0.0147.20 ▼0.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.18 ▼9.31
Media Library /wp-admin/upload.php3.24 ▲0.0133.99 ▼5.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PHP Info
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.56 ▼1.081.68 ▲0.0539.04 ▼8.19
Dashboard /wp-admin2,215 ▲335.79 ▼0.0997.41 ▼11.1238.64 ▼1.13
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0139.47 ▲3.8435.13 ▲0.32
Add New Post /wp-admin/post-new.php1,543 ▲1023.38 ▼0.18614.87 ▼65.9559.66 ▲2.16
Media Library /wp-admin/upload.php1,403 ▲124.31 ▲0.0699.51 ▼0.6941.77 ▼4.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The SRP test was a success

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #2 is missing in php-info-wp/assets to your readme.txt
You can take inspiration from this readme.txt

php-info-wp/phpinfo.php 92% from 13 tests

"PHP Info" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("php-info-wp.php" instead of "phpinfo.php")

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
There were no executable files found in this plugin50 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3122144
HTML2005
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected