78% theperfectweddingnl-widget

Code Review | ThePerfectWedding.nl Widget

WordPress plugin ThePerfectWedding.nl Widget scored78%from 54 tests.

About plugin

  • Plugin page: theperfectwedding...
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-6.0
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: May 30, 2022
  • Number of updates: 37
  • Update frequency: every 69.2 days
  • Top authors: ThePerfectWedding (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /5,465 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

A check of server-side resources used by ThePerfectWedding.nl Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.28 ▲3.84
Dashboard /wp-admin3.32 ▲0.0249.16 ▲2.57
Posts /wp-admin/edit.php3.37 ▲0.0141.85 ▼4.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.65 ▼16.97
Media Library /wp-admin/upload.php3.24 ▲0.0135.80 ▲1.25
TPW Widget Options /wp-admin/options-general.php?page=TPWWidget3.2530.72

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

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

Browser metrics Passed 4 tests

ThePerfectWedding.nl Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.441.67 ▲0.0543.13 ▲1.16
Dashboard /wp-admin2,199 ▲195.58 ▼0.0788.34 ▼0.6742.85 ▲1.66
Posts /wp-admin/edit.php2,101 ▲12.03 ▼0.0034.69 ▼3.7830.23 ▼0.95
Add New Post /wp-admin/post-new.php1,539 ▲418.27 ▲0.20639.55 ▲1.4671.57 ▲4.50
Media Library /wp-admin/upload.php1,407 ▲104.18 ▼0.0395.69 ▼18.1042.29 ▼2.48
TPW Widget Options /wp-admin/options-general.php?page=TPWWidget8412.0124.0133.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_tpw_rating
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/theperfectweddingnl-widget/widget/tpwWidgetFrontendTemplate.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: snippetCode in wp-content/plugins/theperfectweddingnl-widget/widget/tpwWidgetFrontendTemplate.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theperfectweddingnl-widget/admin/tpwAdminPanel.php:12
    • > PHP Notice
      Undefined variable: widgetCode in wp-content/plugins/theperfectweddingnl-widget/widget/tpwWidgetFrontendTemplate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/theperfectweddingnl-widget/widget/tpwWidgetAdminFormTemplate.php:2
    • > PHP Notice
      Undefined variable: ratingsCount in wp-content/plugins/theperfectweddingnl-widget/widget/tpwWidgetFrontendTemplate.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/theperfectweddingnl-widget/widget/tpwWidget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/theperfectweddingnl-widget/admin/tpwAdminPanelTemplate.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theperfectweddingnl-widget/tpw.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === theperfectweddingnl-widget === )
The official readme.txt might help

theperfectweddingnl-widget/tpw.php 85% from 13 tests

The principal PHP file in "ThePerfectWedding.nl Widget" v. 2.7 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("theperfectweddingnl-widget.php" instead of "tpw.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 193 characters long)

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 plugin313 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1083157247
PO File1273766

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin