84% alojapro-widget

Code Review | Alojapro Widget

WordPress plugin Alojapro Widget scored84%from 54 tests.

About plugin

  • Plugin page: alojapro-widget
  • Plugin version: 1.1.24
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2019
  • Latest release: May 15, 2023
  • Number of updates: 47
  • Update frequency: every 27.6 days
  • Top authors: alojapro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,787 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: ▲0.04MB] [CPU: ▼3.98ms] Passed 4 tests

Server-side resources used by Alojapro Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.24 ▲3.09
Dashboard /wp-admin3.34 ▲0.0447.72 ▼2.98
Posts /wp-admin/edit.php3.39 ▲0.0446.93 ▼1.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.82 ▼10.76
Media Library /wp-admin/upload.php3.26 ▲0.0438.85 ▼0.64

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 86 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Alojapro Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲23314.26 ▼0.1014.57 ▲12.7241.30 ▼1.85
Dashboard /wp-admin2,215 ▲275.86 ▲0.97104.24 ▼5.6641.39 ▼3.71
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0232.83 ▼5.0534.87 ▲1.06
Add New Post /wp-admin/post-new.php1,524 ▲1017.59 ▼0.10669.65 ▼24.8658.25 ▼0.88
Media Library /wp-admin/upload.php1,397 ▲64.20 ▼0.03105.16 ▼12.7748.83 ▲2.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/alojapro-widget/alojapro-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed: The official readme.txt might help

alojapro-widget/alojapro-widget.php Passed 13 tests

The main file in "Alojapro Widget" v. 1.1.24 serves as a complement to information provided in readme.txt and as the entry point to the plugin
27 characters long description:
Widget de reservas Alojapro

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin22,017 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
CSS23,2864511,152
SVG30128,954
PO File10209285546
PHP463100496
Sass7594438
JavaScript125964404
JSON10027

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity14.67
▷ Minimum class complexity3.00
▷ Maximum class complexity24.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
17 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%