62% w2ski-widget

Code Review | W2Ski Widget

WordPress plugin W2Ski Widget scored62%from 54 tests.

About plugin

  • Plugin page: w2ski-widget
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2015
  • Latest release: Apr 3, 2015
  • Number of updates: 11
  • Update frequency: every 2.8 days
  • Top authors: vladiiancu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /677 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.68MB] [CPU: ▼46.21ms] Passed 4 tests

Server-side resources used by W2Ski Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.1511.20 ▼28.21
Dashboard /wp-admin2.33 ▼0.9811.60 ▼39.35
Posts /wp-admin/edit.php2.33 ▼1.0311.18 ▼33.44
Add New Post /wp-admin/post-new.php2.33 ▼3.5611.92 ▼83.85
Media Library /wp-admin/upload.php2.33 ▼0.9011.85 ▼25.32
W2Ski Widget /wp-admin/options-general.php?page=w2ski_widget2.3311.99

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

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

Browser metrics Passed 4 tests

A check of browser resources used by W2Ski Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.27 ▼0.081.70 ▲0.2043.48 ▲3.93
Dashboard /wp-admin2,207 ▲305.67 ▲0.0089.05 ▲2.5940.86 ▲1.50
Posts /wp-admin/edit.php2,112 ▲122.06 ▲0.0834.92 ▼0.0733.16 ▼3.96
Add New Post /wp-admin/post-new.php1,537 ▲923.62 ▲0.93680.70 ▲37.3361.16 ▲11.47
Media Library /wp-admin/upload.php1,409 ▲94.28 ▲0.1596.97 ▼17.1741.96 ▼4.67
W2Ski Widget /wp-admin/options-general.php?page=w2ski_widget8231.7325.3426.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/w2ski-widget/includes/class-w2ski-widget.php+28
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_w2s_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=w2ski_widget
    • > Notice in wp-content/plugins/w2ski-widget/includes/class-w2ski-widget.php+162
    Trying to access array offset on value of type bool

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/w2ski-widget/uninstall.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/w2ski-widget/includes/class-w2ski-widget.php:246

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: widget

w2ski-widget/w2ski-plugin.php 77% from 13 tests

The main PHP file in "W2Ski Widget" ver. 0.1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("w2ski-widget.php" instead of "w2ski-plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin239 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP48762209
JavaScript12018
CSS1006
Markdown1306

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2589.29%
▷ Protected methods00.00%
▷ Private methods310.71%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin