57% promociones-tap

Code Review | Promociones TAP

WordPress plugin Promociones TAP scored 57% from 54 tests.

About plugin

  • Plugin page: promociones-tap
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Sep 2, 2015
  • Latest release: Sep 2, 2015
  • Number of updates: 3
  • Update frequency: every 113.0 days
  • Top authors: todoapuestas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,461 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.42MB] [CPU: ▼37.25ms] Passed 4 tests

This is a short check of server-side resources used by Promociones TAP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4043.30 ▼0.81
Dashboard /wp-admin3.52 ▲0.2220.39 ▼29.89
Posts /wp-admin/edit.php3.52 ▲0.1722.66 ▼38.33
Add New Post /wp-admin/post-new.php3.52 ▼2.3619.46 ▼69.83
Media Library /wp-admin/upload.php3.52 ▲0.2923.84 ▼10.93
Agregar nueva /wp-admin/post-new.php?post_type=promocion3.5220.38
Informacion /wp-admin/admin.php?page=promociones-tap3.5224.11
Categorias de Promociones /wp-admin/edit-tags.php?taxonomy=promociones&post_type=promocion3.5321.98
Todas las promociones /wp-admin/edit.php?post_type=promocion3.5321.44
Settings /wp-admin/admin.php?page=promociones-tap/settings3.5219.81

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 84 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
promociones_tap_options_framework
db_upgraded
promociones-tap

Browser metrics Passed 4 tests

An overview of browser requirements for Promociones TAP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,126 ▲39115.45 ▲0.865.75 ▲3.9551.30 ▼1.35
Dashboard /wp-admin2,425 ▲2346.82 ▲1.95139.02 ▲21.0044.79 ▼1.71
Posts /wp-admin/edit.php2,342 ▲2463.50 ▲1.5253.33 ▲11.6431.50 ▼8.95
Add New Post /wp-admin/post-new.php1,603 ▲6123.41 ▲5.16576.60 ▼66.0333.87 ▼30.13
Media Library /wp-admin/upload.php1,479 ▲914.48 ▲0.2984.60 ▼15.9839.56 ▼4.67
Agregar nueva /wp-admin/post-new.php?post_type=promocion2,5368.25178.2378.54
Informacion /wp-admin/admin.php?page=promociones-tap1,0363.3944.1426.38
Categorias de Promociones /wp-admin/edit-tags.php?taxonomy=promociones&post_type=promocion1,5193.5143.5129.15
Todas las promociones /wp-admin/edit.php?post_type=promocion1,3383.6651.2927.22
Settings /wp-admin/admin.php?page=promociones-tap/settings1,1573.4747.6763.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/promociones-tap/admin/includes/cmb/init.php+748
    count(): Parameter must be an array or an object that implements Countable
  • Zombie WordPress options detected upon uninstall: 8 options
    • promociones_tap_options_framework
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • promociones-tap
    • db_upgraded
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promociones-tap/settings
    • > Warning in wp-content/plugins/promociones-tap/admin/includes/cmb/init.php+748
    count(): Parameter must be an array or an object that implements Countable
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promociones-tap/settings
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/admin.php?page=promociones-tap/settings
    • > Notice in wp-content/plugins/promociones-tap/admin/includes/options/class-options-media-uploader.php+62
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/promociones-tap/admin/includes/cmb/tests/phpunit/includes/bootstrap.php
    • > /wp-content/plugins/promociones-tap/public/views/public.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/promociones-tap/admin/includes/cmb/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/promociones-tap/admin/includes/cmb/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/promociones-tap/admin/views/information.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/promociones-tap/admin/includes/cmb/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/promociones-tap/admin/includes/options/class-options-framework.php:9

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/admin.php?page=promociones-tap/settings
    • > Network (severe)
    wp-content/plugins/promociones-tap/assets/banner-772x250.png - Failed to load resource: the server responded with a status of 404 (Not 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
4 plugin tags: ads, promociones, anuncios, publicidad

promociones-tap/promociones-tap.php Passed 13 tests

The main PHP script in "Promociones TAP" version 1.0.0 is automatically included on every request by WordPress
54 characters long description:
Plugin para publicacion de promociones y/o publicidad.

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
No dangerous file extensions were detected7,472 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP249552,1853,481
JavaScript154424712,678
CSS76927900
Markdown3880288
Bourne Shell115459
JSON10031
YAML15018
XML10117

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity34.47
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods229
▷ Static methods4921.40%
▷ Public methods21493.45%
▷ Protected methods20.87%
▷ Private methods135.68%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/includes/cmb/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
admin/includes/cmb/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
admin/includes/cmb/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
admin/includes/cmb/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
admin/includes/cmb/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%