10% desire-page-widget

Code Review | Desire Page Widget

WordPress plugin Desire Page Widget scored10%from 54 tests.

About plugin

  • Plugin page: desire-page-widget
  • Plugin version: 1.0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.1
  • WordPress version: 6.3.1
  • First release: Nov 3, 2015
  • Latest release: Nov 5, 2015
  • Number of updates: 34
  • Update frequency: every 13.4 days
  • Top authors: desirelabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,097 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/desire-page-widget/DesirePageWidget.php+29
    Function create_function() is deprecated

Server metrics [RAM: ▼1.95MB] [CPU: ▼54.15ms] Passed 4 tests

A check of server-side resources used by Desire Page Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.69 ▼32.27
Dashboard /wp-admin2.07 ▼1.275.95 ▼55.98
Posts /wp-admin/edit.php2.07 ▼1.296.50 ▼40.60
Add New Post /wp-admin/post-new.php2.07 ▼3.826.92 ▼87.76
Media Library /wp-admin/upload.php2.07 ▼1.166.69 ▼24.89

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_desire_page_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Desire Page Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.461.70 ▲0.1239.84 ▼10.95
Dashboard /wp-admin2,195 ▲185.55 ▼0.0284.76 ▼1.2737.93 ▼6.18
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0635.11 ▼5.6930.99 ▼6.69
Add New Post /wp-admin/post-new.php1,526 ▼223.13 ▼0.05657.62 ▼22.2953.61 ▲1.82
Media Library /wp-admin/upload.php1,403 ▲64.17 ▼0.0597.07 ▲1.3443.30 ▼0.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/desire-page-widget/DesirePageWidget.php+29
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_desire_page_widget
    • theysaidso_admin_options
    • widget_recent-posts

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 | 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/desire-page-widget/classes/DesireWidget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_theme_textdomain() in wp-content/plugins/desire-page-widget/DesirePageWidget.php:25

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

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: one page, single page, widget, page, layout

desire-page-widget/DesirePageWidget.php 92% from 13 tests

The main file in "Desire Page Widget" v. 1.0.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 ("desire-page-widget.php" instead of "DesirePageWidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin187 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42291117
PO File2141470

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected