68% 3b-meteo

Code Review | 3B Meteo

WordPress plugin 3B Meteo scored68%from 54 tests.

About plugin

  • Plugin page: 3b-meteo
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2010
  • Latest release: Oct 27, 2022
  • Number of updates: 35
  • Update frequency: every 123.9 days
  • Top authors: andreapernici (97.14%)overclokk (5.71%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /39,199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲3.26MB] [CPU: ▲5.08ms] Passed 4 tests

Analyzing server-side resources used by 3B Meteo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.94 ▲3.4748.39 ▲6.18
Dashboard /wp-admin6.96 ▲3.6552.35 ▲3.27
Posts /wp-admin/edit.php6.96 ▲3.6053.85 ▲2.80
Add New Post /wp-admin/post-new.php8.19 ▲2.30103.99 ▲8.06
Media Library /wp-admin/upload.php6.96 ▲3.7351.76 ▲15.84

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

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

Browser metrics Passed 4 tests

Checking browser requirements for 3B Meteo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲19715.11 ▲0.7328.76 ▲26.9145.57 ▲0.93
Dashboard /wp-admin2,204 ▲135.79 ▲0.86100.36 ▼4.5738.65 ▼7.81
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0136.56 ▲1.0035.59 ▼2.08
Add New Post /wp-admin/post-new.php6,367 ▲4,84529.31 ▲6.34911.35 ▲311.3141.48 ▼23.87
Media Library /wp-admin/upload.php1,386 ▲14.20 ▼0.0798.68 ▼1.7342.11 ▲0.27
3B Meteo /wp-admin/TreBiMeteo.php260.440.0713.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • trebimeteo_config

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 39× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Server\\MiddlewareInterface' not found in wp-content/plugins/3b-meteo/src/Http/Server/ResetMiddleware.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Server\\MiddlewareInterface' not found in wp-content/plugins/3b-meteo/src/Http/Server/LocalitiesFixturesMiddleware.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Server\\MiddlewareInterface' not found in wp-content/plugins/3b-meteo/src/Http/Server/LocalitiesMiddleware.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Message\\ResponseFactoryInterface' not found in wp-content/plugins/3b-meteo/src/Http/Message/ResponseFactory.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Client\\ClientInterface' not found in wp-content/plugins/3b-meteo/src/Http/Client/WeatherDataClient.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Server\\MiddlewareInterface' not found in wp-content/plugins/3b-meteo/src/Http/Debug/AddFilterBeforeHttpRemoteCall.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Server\\MiddlewareInterface' not found in wp-content/plugins/3b-meteo/src/Http/Server/WeatherDataFixturesMiddleware.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Server\\MiddlewareInterface' not found in wp-content/plugins/3b-meteo/src/Http/Debug/DebugLogConfigMiddleware.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'TreBiMeteo\\Http\\Server\\MiddlewareInterface' not found in wp-content/plugins/3b-meteo/src/Http/Debug/DebugLogRequestMiddleware.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'ItalyStrap\\Config\\Config_Interface' not found in wp-content/plugins/3b-meteo/vendor/italystrap/config/src/Config/ConfigInterface.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/TreBiMeteo.php
    • > Network (severe)
    wp-admin/TreBiMeteo.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #4 ((Old) Localita' Dati in Diretta **[trebi-b1]**) image missing
You can look at the official readme.txt

3b-meteo/3bmeteo.php 92% from 13 tests

The principal PHP file in "3B Meteo" v. 1.1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("3b-meteo.php" instead of "3bmeteo.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Almost there! Just fix the following issues
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/3b-meteo/vendor/italystrap/config/codecept.bat
      • wp-content/plugins/3b-meteo/vendor/italystrap/cache/codecept.bat
      • wp-content/plugins/3b-meteo/vendor/italystrap/cache/create_empty_dump.bat
      • wp-content/plugins/3b-meteo/vendor/italystrap/cache/test.bat
24,216 lines of code in 123 files:
LanguageFilesBlank linesComment linesLines of code
PHP811,3581,73522,379
JSON1440998
Markdown82540509
XML42217105
JavaScript6293094
SVG12062
YAML20048
Bourne Shell13110
DOS Batch3008
CSS3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.80
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces13
Interfaces13
Traits2
Classes44
▷ Abstract classes00.00%
▷ Concrete classes44100.00%
▷ Final classes3272.73%
Methods238
▷ Static methods2410.08%
▷ Public methods17473.11%
▷ Protected methods4418.49%
▷ Private methods208.40%
Functions58
▷ Named functions2950.00%
▷ Anonymous functions2950.00%
Constants99
▷ Global constants1010.10%
▷ Class constants8989.90%
▷ Public constants89100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin