10% webcupon

Code Review | Web Cupón

WordPress plugin Web Cupón scored 10% from 54 tests.

About plugin

  • Plugin page: webcupon
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 5.8.1
  • First release: Dec 21, 2013
  • Latest release: Dec 21, 2013
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: ibermega (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,184 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/webcupon/sections/paginas.php+25
    Trying to get property 'ID' of non-object

Server metrics [RAM: ▼0.21MB] [CPU: ▼164.09ms] Passed 4 tests

This is a short check of server-side resources used by Web Cupón
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼1.056.16 ▼31.32
Dashboard /wp-admin3.13 ▲0.0840.83 ▼26.45
Posts /wp-admin/edit.php3.18 ▲0.0849.76 ▼8.46
Add New Post /wp-admin/post-new.php5.49 ▲0.0696.04 ▼576.20
Media Library /wp-admin/upload.php3.08 ▲0.0834.85 ▼22.37
Información /wp-admin/admin.php?page=wp_webcupon_info3.0429.90
Web Cupón /wp-admin/admin.php?page=wp_webcupon3.0434.12

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 2 new options
New WordPress options
widget_webcuponoimage_widget
widget_webcupon_widget

Browser metrics Passed 4 tests

Web Cupón: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,876 ▲28015.96 ▲0.4513.46 ▲1.7452.86 ▼17.17
Dashboard /wp-admin2,996 ▲655.93 ▼0.20144.73 ▼21.16122.56 ▼16.07
Posts /wp-admin/edit.php2,784 ▲452.73 ▲0.0466.49 ▼4.1090.39 ▼8.65
Add New Post /wp-admin/post-new.php1,705 ▲2215.73 ▼3.08444.70 ▲59.09120.92 ▲14.10
Media Library /wp-admin/upload.php1,852 ▲1074.98 ▼0.00171.56 ▼2.99183.96 ▲47.90
Información /wp-admin/admin.php?page=wp_webcupon_info1,1272.0861.0182.37
Web Cupón /wp-admin/admin.php?page=wp_webcupon1,1862.1058.24118.25

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 2 options
    • widget_webcupon_widget
    • widget_webcuponoimage_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/webcupon/trunk/widget.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/webcupon/sections/map.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webcupon/webcupon.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_page_by_title() in wp-content/plugins/webcupon/trunk/sections/paginas.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/webcupon/widget.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/webcupon/widget-noimage.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/webcupon/trunk/widget-noimage.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_page_by_title() in wp-content/plugins/webcupon/sections/paginas.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/webcupon/trunk/sections/map.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/webcupon/sections/search.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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: These screenshots do not have images: #1 (Página de ajustes del plugin), #2 (Widgets de Oferta con y sin imagen), #3 (Resultado del Cupón de Descuento), #4 (Página Directorio de Ofertas generado por código shortcode), #5 (Página Mapa de Ofertas generado por código shortcode)
Please take inspiration from this readme.txt

webcupon/webcupon.php 92% from 13 tests

This is the main PHP file of "Web Cupón" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 443 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected515 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP968134284
PO File24242230
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 1.50MB with 1.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png125.12KB45.26KB▼ 63.83%
images/icocupon.png21.44KB0.83KB▼ 96.11%
screenshot-2.png176.70KB56.36KB▼ 68.10%
screenshot-3.png95.69KB28.55KB▼ 70.16%
images/logo-wp-webcupon.png90.71KB29.14KB▼ 67.88%