90% simple-php-info

Code Review | Simple PHP Info

WordPress plugin Simple PHP Info scored90%from 54 tests.

About plugin

  • Plugin page: simple-php-info
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2022
  • Latest release: Aug 25, 2023
  • Number of updates: 7
  • Update frequency: every 52.9 days
  • Top authors: joshmckibbin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.30ms] Passed 4 tests

A check of server-side resources used by Simple PHP Info
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.89 ▲0.87
Dashboard /wp-admin3.72 ▲0.4261.47 ▲14.25
Posts /wp-admin/edit.php3.37 ▲0.0145.00 ▼3.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.91 ▲1.34
Media Library /wp-admin/upload.php3.24 ▲0.0132.87 ▲0.14
Simple PHP Info /wp-admin/options-general.php?page=simple-php-info3.2136.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Simple PHP Info
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /8,138 ▲5,40313.32 ▼1.042.08 ▲0.2532.90 ▼12.01
Dashboard /wp-admin7,486 ▲5,2984.95 ▼0.88130.97 ▲3.5696.17 ▲42.53
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0339.89 ▲4.6834.60 ▲0.08
Add New Post /wp-admin/post-new.php1,517 ▼1617.68 ▼5.56609.77 ▼71.0953.44 ▼4.50
Media Library /wp-admin/upload.php1,392 ▲74.21 ▲0.0493.10 ▼7.4340.01 ▼4.77
Simple PHP Info /wp-admin/options-general.php?page=simple-php-info8352.0323.2927.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • simple_php_info_options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: phpinfo, php, debug

simple-php-info/simple-php-info.php Passed 13 tests

This is the main PHP file of "Simple PHP Info" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
72 characters long description:
Shows phpinfo() in a dashboard widget and creates a [phpinfo] shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin253 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14938168
Sass123084
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin