78% demomentsomtres-basquet

Code Review | DeMomentSomTres Basquet

WordPress plugin DeMomentSomTres Basquet scored 78% from 54 tests.

About plugin

  • Plugin page: demomentsomtres-b...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 5.8.1
  • First release: Mar 24, 2013
  • Latest release: Nov 17, 2013
  • Number of updates: 3
  • Update frequency: every 79.3 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 945 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.85MB] [CPU: ▼187.42ms] Passed 4 tests

Server-side resources used by DeMomentSomTres Basquet
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼0.944.82 ▼18.69
Dashboard /wp-admin1.79 ▼1.268.40 ▼32.91
Posts /wp-admin/edit.php1.80 ▼1.315.16 ▼31.66
Add New Post /wp-admin/post-new.php1.80 ▼3.646.22 ▼656.32
Media Library /wp-admin/upload.php1.80 ▼1.216.19 ▼28.77

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for DeMomentSomTres Basquet
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲22016.25 ▲0.7713.87 ▲6.5551.74 ▲0.33
Dashboard /wp-admin2,976 ▲456.11 ▲0.08142.81 ▼14.74121.88 ▼3.89
Posts /wp-admin/edit.php2,742 ▲32.71 ▲0.0179.04 ▲10.3498.41 ▼0.92
Add New Post /wp-admin/post-new.php1,617 ▼6621.71 ▲2.92275.41 ▼140.26119.94 ▲9.80
Media Library /wp-admin/upload.php1,810 ▲35.05 ▼0.06151.98 ▼10.20130.04 ▼1.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5663
    wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the qibdip-basket handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/demomentsomtres-basquet/qibdip-test.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/demomentsomtres-basquet/qibdip-basket.php:20

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: basquet, basketball, basquetcatalacat

demomentsomtres-basquet/qibdip-basket.php 92% from 13 tests

The main PHP script in "DeMomentSomTres Basquet" version 1.5.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("demomentsomtres-basquet.php" instead of "qibdip-basket.php")

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
Success! There were no dangerous files found in this plugin276 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript105140
PHP5827136

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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