78% indianwebs-pideme-cambios

Code Review | Pídeme Cambios

WordPress plugin Pídeme Cambios scored78%from 54 tests.

About plugin

  • Plugin page: indianwebs-pideme...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2019
  • Latest release: Sep 16, 2020
  • Number of updates: 8
  • Update frequency: every 54.3 days
  • Top authors: IndianWebs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.55MB] [CPU: ▼14.42ms] Passed 4 tests

Server-side resources used by Pídeme Cambios
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1344.62 ▲4.55
Dashboard /wp-admin3.43 ▲0.1352.90 ▲2.85
Posts /wp-admin/edit.php3.55 ▲0.1949.81 ▼5.68
Add New Post /wp-admin/post-new.php3.28 ▼2.6142.84 ▼53.71
Media Library /wp-admin/upload.php3.36 ▲0.1338.21 ▼1.14
Add New /wp-admin/post-new.php?post_type=changes3.2835.16
All Changes /wp-admin/edit.php?post_type=changes3.4037.95

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Pídeme Cambios
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,483 ▲72214.78 ▲0.4234.98 ▲33.4643.62 ▲4.17
Dashboard /wp-admin2,242 ▲655.56 ▼0.0589.50 ▼2.1040.94 ▼2.56
Posts /wp-admin/edit.php2,147 ▲472.02 ▼0.0437.84 ▼6.3734.79 ▼5.84
Add New Post /wp-admin/post-new.php1,566 ▲3822.99 ▼0.04661.07 ▼42.8057.23 ▲7.29
Media Library /wp-admin/upload.php1,441 ▲414.18 ▲0.0697.18 ▼8.1642.96 ▼2.13
Add New /wp-admin/post-new.php?post_type=changes2,3057.56165.8366.14
All Changes /wp-admin/edit.php?post_type=changes1,1271.9731.7329.38

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=changes
    • > Warning in wp-includes/class-wp-hook.php+312
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Pideme_cambios_Public' does not have a method 'iw_pc_create_custom_post'
    • > GET request to /wp-admin/post-new.php?post_type=changes
    • > Warning in wp-includes/class-wp-hook.php+312
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Pideme_cambios_Public' does not have a method 'iw_pc_update_post_ticket'

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/indianwebs-pideme-cambios/admin/partials/pideme_cambios-admin-display.php
    • > /wp-content/plugins/indianwebs-pideme-cambios/public/partials/pideme_cambios-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: "lawebdelpoble.com"
You can take inspiration from this readme.txt

indianwebs-pideme-cambios/pideme_cambios.php 92% from 13 tests

"Pídeme Cambios" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("indianwebs-pideme-cambios.php" instead of "pideme_cambios.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected27,975 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS606,07218,577
JavaScript63,5231078,782
PHP12271572614
SVG2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/buttons_front.png2.17KB1.22KB▼ 43.97%
admin/images/logoindianwebsgrande.png21.21KB10.60KB▼ 50.06%
admin/images/select_role.png2.18KB1.49KB▼ 31.56%