10% weather-widget-by-calcatraz

Code Review | Weather Widget by Calcatraz

WordPress plugin Weather Widget by Calcatraz scored10%from 54 tests.

About plugin

  • Plugin page: weather-widget-by...
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Apr 12, 2014
  • Number of updates: 31
  • Update frequency: every 3.9 days
  • Top authors: danmossop (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /9,011 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/weather-widget-by-calcatraz/calcatraz-weather-widget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; calcatrazWeatherWidget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼54.36ms] Passed 4 tests

Server-side resources used by Weather Widget by Calcatraz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.334.85 ▼33.31
Dashboard /wp-admin2.16 ▼1.195.79 ▼54.75
Posts /wp-admin/edit.php2.16 ▼1.206.29 ▼38.24
Add New Post /wp-admin/post-new.php2.16 ▼3.737.16 ▼91.15
Media Library /wp-admin/upload.php2.16 ▼1.075.24 ▼26.83

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_calcatrazweatherwidget
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Weather Widget by Calcatraz: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲13613.60 ▼0.949.83 ▲8.1744.53 ▲2.84
Dashboard /wp-admin2,209 ▲275.85 ▼0.00103.63 ▼3.2341.06 ▼0.22
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0134.57 ▲0.2231.69 ▼2.78
Add New Post /wp-admin/post-new.php1,533 ▼023.00 ▼0.11658.58 ▲1.9759.29 ▲2.53
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.0496.19 ▼5.4742.64 ▼0.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/weather-widget-by-calcatraz/calcatraz-weather-widget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; calcatrazWeatherWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_calcatrazweatherwidget
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/weather-widget-by-calcatraz/calcatraz-weather-widget.php:13

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 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

weather-widget-by-calcatraz/calcatraz-weather-widget.php 92% from 13 tests

The main PHP file in "Weather Widget by Calcatraz" ver. 1.3.7 adds more information about the plugin and also serves as the entry point for this 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 ("weather-widget-by-calcatraz.php" instead of "calcatraz-weather-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin251 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP13225247
CSS4004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin