78% dynamic-visitor-weather

Code Review | Dynamic Visitor Weather

WordPress plugin Dynamic Visitor Weather scored 78% from 54 tests.

About plugin

  • Plugin page: dynamic-visitor-w...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Jun 2, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mohamedatef (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 4,722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.03ms] Passed 4 tests

A check of server-side resources used by Dynamic Visitor Weather
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1137.65 ▼5.11
Dashboard /wp-admin3.42 ▲0.1245.34 ▼2.51
Posts /wp-admin/edit.php3.54 ▲0.1845.37 ▼1.23
Add New Post /wp-admin/post-new.php6.00 ▲0.1286.70 ▼7.26
Media Library /wp-admin/upload.php3.35 ▲0.1235.00 ▼1.02

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
dvw_options
theysaidso_admin_options
widget_theysaidso_widget
widget_dvw
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Dynamic Visitor Weather
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.22 ▼1.192.05 ▼0.0041.25 ▼10.41
Dashboard /wp-admin2,221 ▲335.83 ▲0.95109.80 ▲7.0266.02 ▲22.71
Posts /wp-admin/edit.php2,107 ▲182.00 ▼0.0135.26 ▼1.3533.38 ▼1.30
Add New Post /wp-admin/post-new.php1,527 ▲723.08 ▼0.30670.24 ▼12.4464.06 ▲6.95
Media Library /wp-admin/upload.php1,397 ▲94.24 ▲0.06112.10 ▲7.0544.62 ▲0.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_dvw
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dynamic-visitor-weather/languages/index.php
    • > /wp-content/plugins/dynamic-visitor-weather/images/index.php
    • > /wp-content/plugins/dynamic-visitor-weather/dynamic-visitor-weather.php
    • > /wp-content/plugins/dynamic-visitor-weather/js/index.php
    • > /wp-content/plugins/dynamic-visitor-weather/includes/index.php
    • > /wp-content/plugins/dynamic-visitor-weather/index.php
    • > /wp-content/plugins/dynamic-visitor-weather/css/index.php
  • 2× 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/dynamic-visitor-weather/includes/DvwWidget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-visitor-weather/includes/OptionsPage.php:162

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

dynamic-visitor-weather/dynamic-visitor-weather.php 92% from 13 tests

The main file in "Dynamic Visitor Weather" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Make the plugin description longer than 10 characters (currently 0 characters long)

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
Good job! No executable or dangerous file extensions detected722 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6105122522
CSS21511109
JavaScript1131091

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity21.00
▷ Minimum class complexity10.00
▷ Maximum class complexity35.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1147.83%
▷ Protected methods00.00%
▷ Private methods1252.17%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin