83% creo-weather-today-widget

Code Review | Creo Weather Today

WordPress plugin Creo Weather Today scored83%from 54 tests.

About plugin

  • Plugin page: creo-weather-toda...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2015
  • Latest release: Nov 17, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: Rashedamin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,279 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.00MB] [CPU: ▼11.05ms] Passed 4 tests

This is a short check of server-side resources used by Creo Weather Today
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.41 ▼5.01
Dashboard /wp-admin3.32 ▼0.0345.82 ▼13.03
Posts /wp-admin/edit.php3.37 ▲0.0144.88 ▼3.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.20 ▼22.78
Media Library /wp-admin/upload.php3.24 ▲0.0133.98 ▼2.02

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_creo-weather-today
db_upgraded

Browser metrics Passed 4 tests

Creo Weather Today: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲19414.07 ▼0.3112.53 ▲10.6976.63 ▲28.10
Dashboard /wp-admin2,206 ▲185.91 ▲1.05105.22 ▼13.3039.88 ▼5.59
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0240.46 ▲2.7036.25 ▼0.77
Add New Post /wp-admin/post-new.php1,535 ▲1623.24 ▲0.00665.73 ▲76.1959.59 ▲7.46
Media Library /wp-admin/upload.php1,388 ▼34.13 ▼0.0698.15 ▼0.8440.82 ▼0.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_creo-weather-today
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Good news, no errors were detected

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/creo-weather-today-widget/creo-weather-today.php:13

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #0, #0, #0, #0 in creo-weather-today-widget/assets to your readme.txt
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Add to Widgets), #2 (Color chooser for background and foreground), #3 (Creo Weather Today Preview 1 (Sunset/sunrise times & Weather Icon in **Pro**)), #4 (Creo Weather Today Preview 2 (Sunset/sunrise times & Weather Icon in **Pro**))
Please take inspiration from this readme.txt

creo-weather-today-widget/creo-weather-today.php 85% from 13 tests

Analyzing the main PHP file in "Creo Weather Today" version 1.0.0
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("creo-weather-today-widget.php" instead of "creo-weather-today.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin282 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11766120
JavaScript1151679
CSS114456
PO File15527

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/blank.png0.97KB0.10KB▼ 89.94%
img/accessd.png9.98KB4.65KB▼ 53.40%
img/humidity.png2.08KB1.51KB▼ 27.55%
img/wind.png0.73KB0.50KB▼ 32.04%