10% beautiful-yahoo-weather

Code Review | Beautiful Yahoo Weather

WordPress plugin Beautiful Yahoo Weather scored10%from 54 tests.

About plugin

  • Plugin page: beautiful-yahoo-w...
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: May 7, 2014
  • Latest release: Nov 10, 2015
  • Number of updates: 43
  • Update frequency: every 12.8 days
  • Top authors: FARES_1990 (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

300+ active /26,684 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
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/beautiful-yahoo-weather/inc/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; byw has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼55.02ms] Passed 4 tests

Server-side resources used by Beautiful Yahoo Weather
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.78 ▼37.62
Dashboard /wp-admin2.12 ▼1.188.03 ▼43.67
Posts /wp-admin/edit.php2.13 ▼1.238.52 ▼43.30
Add New Post /wp-admin/post-new.php2.13 ▼3.766.83 ▼95.48
Media Library /wp-admin/upload.php2.13 ▼1.108.22 ▼29.86

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 372 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_byw

Browser metrics Passed 4 tests

An overview of browser requirements for Beautiful Yahoo Weather
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲6913.33 ▼1.074.19 ▲2.4143.88 ▲1.98
Dashboard /wp-admin2,224 ▲365.85 ▼0.0498.61 ▼9.9670.21 ▲29.77
Posts /wp-admin/edit.php2,104 ▲182.02 ▼0.0335.89 ▲0.3834.67 ▲1.28
Add New Post /wp-admin/post-new.php1,527 ▼623.16 ▼0.23702.51 ▲12.7549.93 ▼6.98
Media Library /wp-admin/upload.php1,397 ▲64.13 ▲0.02111.35 ▼0.9181.68 ▲34.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/beautiful-yahoo-weather/inc/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; byw has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_byw
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Please fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/beautiful-yahoo-weather/beautiful-yahoo-weather.php:22
    • > PHP Notice
      Undefined variable: mylang in wp-content/plugins/beautiful-yahoo-weather/inc/lang.php on line 1482
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/beautiful-yahoo-weather/inc/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/beautiful-yahoo-weather/inc/shortcode.php:103
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beautiful-yahoo-weather/inc/options-page.php:2
    • > PHP Notice
      Undefined variable: smylang in wp-content/plugins/beautiful-yahoo-weather/inc/lang.php on line 2092

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: beautiful, yahoo, weather

beautiful-yahoo-weather/beautiful-yahoo-weather.php Passed 13 tests

The primary PHP file in "Beautiful Yahoo Weather" version 1.4.2 is used by WordPress to initiate all plugin functionality
71 characters long description:
A simple plugin that enables you to add Yahoo Weather to add your site.

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 plugin3,506 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP528273,506

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
366 PNG files occupy 2.56MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dark/png/41.png10.23KB6.03KB▼ 41.04%
images/flat_black/png/09.png1.88KB2.13KB0.00%
images/flat_white/png/07.png4.10KB2.78KB▼ 32.20%
images/dark/png/15.png9.71KB5.97KB▼ 38.50%
images/light/png/19-old.png8.03KB5.04KB▼ 37.18%