84% tiempo

Code Review | Tiempo

WordPress plugin Tiempo scored 84% from 54 tests.

About plugin

  • Plugin page: tiempo
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.8
  • WordPress version: 5.8.1
  • First release: Sep 30, 2019
  • Latest release: Jul 16, 2021
  • Number of updates: 9
  • Update frequency: every 72.9 days
  • Top authors: tiempo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 3,639 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼140.57ms] Passed 4 tests

This is a short check of server-side resources used by Tiempo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2036.56 ▲13.35
Dashboard /wp-admin3.14 ▲0.0853.26 ▲6.00
Posts /wp-admin/edit.php3.25 ▲0.1452.79 ▲8.44
Add New Post /wp-admin/post-new.php5.50 ▲0.0692.81 ▼576.75
Media Library /wp-admin/upload.php3.08 ▲0.0835.23 ▲0.05

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 1 new option
New WordPress options
widget_tiempo_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tiempo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲22016.68 ▲0.6914.44 ▲6.4746.86 ▼10.01
Dashboard /wp-admin2,977 ▲435.93 ▼0.00139.81 ▼14.17112.98 ▼3.55
Posts /wp-admin/edit.php2,743 ▲42.69 ▼0.0069.57 ▼0.3488.66 ▲1.10
Add New Post /wp-admin/post-new.php1,687 ▲418.44 ▼0.33368.74 ▲0.07117.86 ▲8.06
Media Library /wp-admin/upload.php1,814 ▲74.99 ▼0.11145.04 ▼10.03118.87 ▼10.40

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
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_tiempo_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tiempo/admin/partials/tiempo-admin-display.php
    • > /wp-content/plugins/tiempo/public/partials/tiempo-public-display.php

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in tiempo/assets to your readme.txt
Please take inspiration from this readme.txt

tiempo/tiempo.php Passed 13 tests

The principal PHP file in "Tiempo" v. 1.0.0 is loaded by WordPress automatically on each request
45 characters long description:
Beautiful Spanish weather forecasting widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected754 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12146543403
JavaScript24062186
CSS22213165

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.88
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin