10% wp-parsi-iran-weather

Code Review | WP-Parsi Iran weather

WordPress plugin WP-Parsi Iran weather scored10%from 54 tests.

About plugin

  • Plugin page: wp-parsi-iran-wea...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2013
  • Latest release: Jan 5, 2020
  • Number of updates: 26
  • Update frequency: every 96.6 days
  • Top authors: man4toman (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

300+ active /17,196 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.29ms] Passed 4 tests

Server-side resources used by WP-Parsi Iran weather
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.74 ▼34.28
Dashboard /wp-admin2.05 ▼1.265.66 ▼40.83
Posts /wp-admin/edit.php2.05 ▼1.316.56 ▼38.40
Add New Post /wp-admin/post-new.php2.05 ▼3.845.81 ▼87.63
Media Library /wp-admin/upload.php2.05 ▼1.185.83 ▼25.21

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_postsfromcat-widget
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP-Parsi Iran weather
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲18613.58 ▼0.787.98 ▲6.2639.19 ▼4.78
Dashboard /wp-admin2,208 ▲234.86 ▼0.95110.32 ▲4.1736.17 ▼5.41
Posts /wp-admin/edit.php2,094 ▲52.03 ▲0.0140.22 ▲4.7334.93 ▲0.29
Add New Post /wp-admin/post-new.php1,533 ▲323.10 ▲4.91585.04 ▼24.1949.39 ▼8.66
Media Library /wp-admin/upload.php1,396 ▲114.28 ▲0.10102.02 ▲7.2643.14 ▲1.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_postsfromcat-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-parsi-iran-weather/includes/cities.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-parsi-iran-weather/wp-parsi-iran-weather.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Weather widget in Persian and English)
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-parsi-iran-weather/wp-parsi-iran-weather.php Passed 13 tests

The entry point to "WP-Parsi Iran weather" version 1.9 is a PHP file that has certain tags in its header comment area
98 characters long description:
Get accurate and beautiful weather forecasts for Iran cities powered by weather.com for your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin4,471 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33983252,790
PO File17998381,611
CSS10057
JavaScript11013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity151.00
▷ Minimum class complexity66.00
▷ Maximum class complexity249.00
Average method complexity5.69
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods96
▷ Static methods11.04%
▷ Public methods8184.38%
▷ Protected methods1515.62%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png60.85KB25.90KB▼ 57.43%