83% descuentoz

Code Review | Descuentoz

WordPress plugin Descuentoz scored 83% from 54 tests.

About plugin

  • Plugin page: descuentoz
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2020
  • Latest release: Aug 31, 2021
  • Number of updates: 8
  • Update frequency: every 38.5 days
  • Top authors: descuentoz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 653 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲301.96ms] 75% from 4 tests

An overview of server-side resources used by Descuentoz
The following require your attention
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 301.96ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.03324.83 ▲281.22
Dashboard /wp-admin3.32 ▲0.02340.56 ▲290.55
Posts /wp-admin/edit.php3.38 ▲0.02377.75 ▲330.87
Add New Post /wp-admin/post-new.php5.92 ▲0.04389.83 ▲306.57
Media Library /wp-admin/upload.php3.25 ▲0.02362.59 ▲329.49

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Descuentoz
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲5914.80 ▲0.511.62 ▼0.2836.81 ▼12.65
Dashboard /wp-admin2,213 ▲254.87 ▼0.01109.89 ▼7.7640.35 ▼7.18
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0234.50 ▼7.6736.21 ▼2.16
Add New Post /wp-admin/post-new.php1,517 ▼221.10 ▼2.15617.13 ▼33.7554.42 ▼1.34
Media Library /wp-admin/upload.php1,386 ▼24.15 ▼0.0392.01 ▼20.7740.19 ▼14.57

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/descuentoz/descuentoz.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
  • Requires php: Invalid plugin version format
  • Screenshots: Please describe screenshot #4 in descuentoz/assets to your readme.txt
The official readme.txt is a good inspiration

descuentoz/descuentoz.php Passed 13 tests

Analyzing the main PHP file in "Descuentoz" version 0.9.2
95 characters long description:
Genera URLs para cupones de descuentos que pueden ser publicados en el directorio de descuentoz

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,371 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP163352571,304
JavaScript1101244
CSS14013
JSON20010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity17.75
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods59
▷ Static methods1322.03%
▷ Public methods5186.44%
▷ Protected methods00.00%
▷ Private methods813.56%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected