84% server-info-wp

Code Review | Server Info WP

WordPress plugin Server Info WP scored84%from 54 tests.

About plugin

  • Plugin page: server-info-wp
  • Plugin version: 2.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 9, 2020
  • Latest release: Apr 17, 2020
  • Number of updates: 10
  • Update frequency: every 3.8 days
  • Top authors: tylerthedude (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Server Info WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.68 ▼5.26
Dashboard /wp-admin3.32 ▲0.02494.35 ▲440.11
Posts /wp-admin/edit.php3.37 ▲0.0146.73 ▼6.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.34 ▼23.26
Media Library /wp-admin/upload.php3.24 ▲0.0143.59 ▲5.08

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Server Info WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,023 ▲23714.35 ▼0.051.83 ▼0.1833.09 ▼10.07
Dashboard /wp-admin2,429 ▲2495.73 ▲0.1089.78 ▼0.4747.72 ▲4.36
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0133.35 ▼2.6834.21 ▲0.96
Add New Post /wp-admin/post-new.php1,526 ▼023.20 ▲0.15674.68 ▲6.3757.48 ▲4.55
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.00106.67 ▼3.3649.63 ▲6.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/server-info-wp/init.php:26

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: server information, server statistics, server monitor, server usage, server monitoring...

server-info-wp/init.php 92% from 13 tests

"Server Info WP" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("server-info-wp.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin281 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP27257235
CSS14039
JavaScript1007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
server.png0.98KB0.76KB▼ 22.56%