10% webinfos

Code Review | Webinfos

WordPress plugin Webinfos scored10%from 54 tests.

About plugin

  • Plugin page: webinfos
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.5
  • WordPress version: 6.3.1
  • First release: Apr 17, 2016
  • Latest release: Jun 11, 2016
  • Number of updates: 9
  • Update frequency: every 6.2 days
  • Top authors: ymjid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /604 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Webinfos_Plugin::webinfos_install() should not be called statically

Server metrics [RAM: ▲0.26MB] [CPU: ▼6.95ms] Passed 4 tests

A check of server-side resources used by Webinfos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2542.10 ▲0.95
Dashboard /wp-admin3.56 ▲0.2652.62 ▲4.14
Posts /wp-admin/edit.php3.68 ▲0.3246.63 ▼12.56
Add New Post /wp-admin/post-new.php6.14 ▲0.2689.24 ▼15.60
Media Library /wp-admin/upload.php3.49 ▲0.2639.00 ▼0.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: 1 new table, 8 new options
New tables
wp_webinfos
New WordPress options
webinfos_active_msg
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
webinfos_active_msg_all
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Webinfos
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8714.74 ▲0.181.80 ▲0.1442.63 ▼7.02
Dashboard /wp-admin2,231 ▲405.88 ▼0.02104.24 ▲5.5542.76 ▼2.20
Posts /wp-admin/edit.php2,111 ▲222.05 ▲0.0137.60 ▼4.2435.80 ▼2.15
Add New Post /wp-admin/post-new.php1,553 ▲1623.19 ▲0.22689.90 ▲87.7260.89 ▲15.29
Media Library /wp-admin/upload.php1,407 ▲164.23 ▲0.0396.09 ▼4.1241.62 ▼0.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Webinfos_Plugin::webinfos_uninstall() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/webinfos/webinfos.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: webinfos, welcome message, dashboard widget, custom message, message...

webinfos/webinfos.php Passed 13 tests

The main PHP script in "Webinfos" version 1.2 is automatically included on every request by WordPress
65 characters long description:
A plugin showing a customisable welcome message in the dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,883 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2731431,408
PO File18794209
JavaScript1179198
CSS10068

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity61.50
▷ Minimum class complexity47.00
▷ Maximum class complexity76.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods49100.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
PNG images were not found in this plugin