10% showguests

Code Review | Showguests

WordPress plugin Showguests scored10%from 54 tests.

About plugin

  • Plugin page: showguests
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.0
  • WordPress version: 6.3.1
  • First release: Apr 26, 2013
  • Latest release: Sep 12, 2013
  • Number of updates: 23
  • Update frequency: every 6.0 days
  • Top authors: tiandi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,133 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/showguests/showguests.php+100
    Methods with the same name as their class will not be constructors in a future version of PHP; showguestswidget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.48ms] Passed 4 tests

Analyzing server-side resources used by Showguests
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.86 ▼37.51
Dashboard /wp-admin2.11 ▼1.195.81 ▼47.55
Posts /wp-admin/edit.php2.11 ▼1.256.58 ▼46.17
Add New Post /wp-admin/post-new.php2.11 ▼3.785.29 ▼86.68
Media Library /wp-admin/upload.php2.11 ▼1.125.44 ▼32.26
Showguests /wp-admin/options-general.php?page=Showguestsinfo2.115.14

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_showguestswidget

Browser metrics Passed 4 tests

An overview of browser requirements for Showguests
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.32 ▲0.041.88 ▲0.0544.37 ▼1.31
Dashboard /wp-admin2,201 ▲245.58 ▼0.0188.69 ▼7.9938.05 ▼4.61
Posts /wp-admin/edit.php2,106 ▲62.01 ▼0.0239.74 ▲2.2535.22 ▲0.48
Add New Post /wp-admin/post-new.php1,531 ▲523.29 ▼0.12686.77 ▲3.1652.80 ▼4.69
Media Library /wp-admin/upload.php1,406 ▲64.21 ▲0.09102.30 ▼10.7944.58 ▼3.27
Showguests /wp-admin/options-general.php?page=Showguestsinfo8181.9725.0527.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/showguests/showguests.php+100
    Methods with the same name as their class will not be constructors in a future version of PHP; showguestswidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_showguestswidget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=Showguestsinfo
    • > Deprecated in wp-content/plugins/showguests/showguests.php+100
    Methods with the same name as their class will not be constructors in a future version of PHP; showguestswidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=Showguestsinfo
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in showguestswidget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Showguestsinfo
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=Showguestsinfo
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=Showguestsinfo
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=Showguestsinfo
    • > Notice in wp-content/plugins/showguests/showguests.php+19
    Undefined index: showguestcounts
    • > GET request to /wp-admin/options-general.php?page=Showguestsinfo
    • > Notice in wp-content/plugins/showguests/showguests.php+29
    Undefined index: showguestmyname

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/showguests/showguests.php:100

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === showguests === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (As a Widget.), #2 (As a page.)
You can look at the official readme.txt

showguests/showguests.php Passed 13 tests

The main PHP file in "Showguests" ver. 1.02 adds more information about the plugin and also serves as the entry point for this plugin
49 characters long description:
Display guests who visited your website recently.

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
Success! There were no dangerous files found in this plugin169 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1158131
CSS17438

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions5
▷ Named functions5100.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
2 PNG files occupy 0.18MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png61.63KB18.22KB▼ 70.43%
screenshot-2.png118.39KB31.56KB▼ 73.35%