68% my-contador-wp

Code Review | My Contador lesr

WordPress plugin My Contador lesr scored68%from 54 tests.

About plugin

  • Plugin page: my-contador-wp
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2015
  • Latest release: Feb 18, 2023
  • Number of updates: 49
  • Update frequency: every 54.8 days
  • Top authors: luydjmi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /6,083 total downloads

Benchmarks

Plugin footprint 65% 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: ▼7.26ms] Passed 4 tests

This is a short check of server-side resources used by My Contador lesr
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.31 ▼3.94
Dashboard /wp-admin3.34 ▼0.0047.76 ▼14.74
Posts /wp-admin/edit.php3.39 ▲0.0450.79 ▼0.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.99 ▼9.68
Media Library /wp-admin/upload.php3.26 ▲0.0438.98 ▼0.69
Configuracion /wp-admin/admin.php?page=configuracion3.2335.21
Contador LESR /wp-admin/admin.php?page=contador-lista3.2333.44

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: 2 new tables, 6 new options
New tables
wp_contar
wp_config_contar
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for My Contador lesr
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.28 ▼0.072.01 ▲0.4145.12 ▼1.31
Dashboard /wp-admin2,222 ▲425.58 ▲0.0196.12 ▲3.8544.65 ▼0.65
Posts /wp-admin/edit.php2,127 ▲242.03 ▲0.0336.18 ▼6.0041.23 ▲5.27
Add New Post /wp-admin/post-new.php1,548 ▲2223.26 ▲0.18692.33 ▼7.6451.55 ▼3.79
Media Library /wp-admin/upload.php1,430 ▲304.18 ▼0.0097.36 ▼7.8347.37 ▼0.69
Configuracion /wp-admin/admin.php?page=configuracion8672.0624.4829.86
Contador LESR /wp-admin/admin.php?page=contador-lista1,2042.4342.0973.56

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
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_config_contar
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/my-contador-wp/contador.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/my-contador-wp/contador.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/my-contador-wp/contador.php:89

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=configuracion
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=configuracion 152 Failed to find a valid digest in the 'integrity' attribute for resource 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css' with computed SHA-384 integrity '1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3'. The resource has been blocked.
    • > GET request to /wp-admin/admin.php?page=configuracion
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=configuracion - Failed to find a valid digest in the 'integrity' attribute for resource 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js' with computed SHA-384 integrity 'ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p'. The resource has been blocked.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (ContadorLESR.png), #2 (ContadorLESRConfiguracion.png), #3 (EditarpaginaLanding.png), #4 (LandingPage.png)
Please take inspiration from this readme.txt

my-contador-wp/contador.php 85% from 13 tests

This is the main PHP file of "My Contador lesr" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("my-contador-wp.php" instead of "contador.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 1390 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin427 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP313256427

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.34MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ContadorLESRConfiguracion.png82.39KB22.67KB▼ 72.49%
LandingPage.png71.78KB17.19KB▼ 76.06%
ContadorLESR.png116.30KB34.33KB▼ 70.48%
EditarpaginaLanding.png82.10KB22.60KB▼ 72.47%