84% widget-for-tmepcz

Code Review | TMEP.cz widget

WordPress plugin TMEP.cz widget scored 84% from 54 tests.

About plugin

  • Plugin page: widget-for-tmepcz
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 5.8.1
  • First release: Feb 5, 2017
  • Latest release: May 31, 2019
  • Number of updates: 29
  • Update frequency: every 51.3 days
  • Top authors: LuCash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 601 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼146.02ms] Passed 4 tests

An overview of server-side resources used by TMEP.cz widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.01 ▲7.14
Dashboard /wp-admin3.10 ▲0.0446.99 ▲0.79
Posts /wp-admin/edit.php3.15 ▲0.0449.61 ▲0.06
Add New Post /wp-admin/post-new.php5.46 ▲0.0287.59 ▼586.33
Media Library /wp-admin/upload.php3.04 ▲0.0437.43 ▲1.42

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
widget_tmep

Browser metrics Passed 4 tests

This is an overview of browser requirements for TMEP.cz widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲11716.19 ▲0.578.68 ▲1.3053.45 ▼4.23
Dashboard /wp-admin2,969 ▲355.89 ▼0.07144.61 ▼25.29110.00 ▼14.13
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.1169.07 ▼0.3799.92 ▲5.40
Add New Post /wp-admin/post-new.php1,591 ▼9218.78 ▲0.07385.51 ▼23.65116.27 ▲7.48
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.01166.74 ▲11.41129.65 ▼0.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_tmep

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget-for-tmepcz/widget-for-tmepcz.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: dew point, temperature, humidity, tmep, weather

widget-for-tmepcz/widget-for-tmepcz.php Passed 13 tests

"TMEP.cz widget" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
84 characters long description:
Widget for displaying current measurements of temperature and humidity from tmep.cz.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin98 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1352498

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin