78% meteosales

Code Review | MeteoSales

WordPress plugin MeteoSales scored78%from 54 tests.

About plugin

  • Plugin page: meteosales
  • Plugin version: 1.0.16
  • PHP compatiblity: 7.4.26+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 3, 2022
  • Latest release: Dec 15, 2022
  • Number of updates: 59
  • Update frequency: every 6.1 days
  • Top authors: meteosales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,271 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▲2.69ms] Passed 4 tests

A check of server-side resources used by MeteoSales
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2345.63 ▲2.50
Dashboard /wp-admin3.53 ▲0.2355.51 ▲8.76
Posts /wp-admin/edit.php3.65 ▲0.2953.76 ▲6.52
Add New Post /wp-admin/post-new.php6.13 ▲0.2594.95 ▼1.46
Media Library /wp-admin/upload.php3.46 ▲0.2339.44 ▲3.19
MeteoSales /wp-admin/admin.php?page=meteo_sales3.4335.39
Banner Settings /wp-admin/admin.php?page=banner_setting3.4443.32
Settings /wp-admin/admin.php?page=general_setting3.4836.33

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

MeteoSales: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲16713.98 ▼0.215.12 ▲3.0340.43 ▼4.19
Dashboard /wp-admin2,221 ▲335.86 ▲0.8399.59 ▼9.5985.43 ▲40.20
Posts /wp-admin/edit.php2,122 ▲331.98 ▼0.0238.52 ▲3.2433.68 ▼5.07
Add New Post /wp-admin/post-new.php1,545 ▲2123.23 ▲0.10693.72 ▲40.9761.76 ▼5.22
Media Library /wp-admin/upload.php1,409 ▲214.19 ▼0.11103.62 ▲2.0467.41 ▲21.65
MeteoSales /wp-admin/admin.php?page=meteo_sales2,00716.15514.8394.32
Banner Settings /wp-admin/admin.php?page=banner_setting8432.0425.4230.05
Settings /wp-admin/admin.php?page=general_setting8432.0324.5621.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/meteosales/public/partials/meteosales-public-display.php
    • > /wp-content/plugins/meteosales/admin/partials/meteosales-admin-display.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=general_setting
    • > Network (severe)
    wp-content/plugins/meteosales/admin/js/meteosales-admin.js?ver=1.0.16 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: "info@meteosales.com"
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

meteosales/meteosales.php Passed 13 tests

The main PHP file in "MeteoSales" ver. 1.0.16 adds more information about the plugin and also serves as the entry point for this plugin
46 characters long description:
The Swiss army knife solutions for WooCommerce

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
Good job! No executable or dangerous file extensions detected11,355 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
SVG5009,572
PHP213747281,782
CSS30141

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/meteocommerce_icon_20x20.png0.65KB0.32KB▼ 50.00%
admin/images/meteosales_20.png0.72KB0.70KB▼ 3.38%