89% moloni-es

Code Review | Moloni España

WordPress plugin Moloni España scored89%from 54 tests.

About plugin

  • Plugin page: moloni-es
  • Plugin version: 1.0.51
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2020
  • Latest release: Oct 26, 2023
  • Number of updates: 73
  • Update frequency: every 16.6 days
  • Top authors: molonies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,589 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.59ms] Passed 4 tests

This is a short check of server-side resources used by Moloni España
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.70 ▼0.57
Dashboard /wp-admin3.31 ▲0.0044.23 ▼7.89
Posts /wp-admin/edit.php3.36 ▲0.0043.45 ▼2.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.39 ▼23.24
Media Library /wp-admin/upload.php3.23 ▲0.0034.53 ▲1.13

Server storage [IO: ▲0.54MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 99 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Moloni España: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▼0.141.51 ▼0.2742.68 ▼2.02
Dashboard /wp-admin2,198 ▲215.61 ▲0.0283.95 ▼3.4937.06 ▲0.38
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0232.89 ▼19.1333.64 ▼18.87
Add New Post /wp-admin/post-new.php1,533 ▼423.13 ▲5.03658.12 ▼4.0258.92 ▼10.42
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0794.96 ▼0.2041.36 ▼1.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Moloni España === )
Please take inspiration from this readme.txt

moloni-es/moloni_es.php 85% from 13 tests

"Moloni España" version 1.0.51's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("moloni-es.php" instead of "moloni_es.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 plugin8,802 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP791,5892,1048,229
CSS2335203
Markdown1650191
JavaScript4449154
JSON20023
SVG2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.64
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes64
▷ Abstract classes00.00%
▷ Concrete classes64100.00%
▷ Final classes00.00%
Methods352
▷ Static methods16346.31%
▷ Public methods26575.28%
▷ Protected methods00.00%
▷ Private methods8724.72%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants13
▷ Global constants753.85%
▷ Class constants646.15%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-white.png2.07KB1.24KB▼ 40.20%
images/small_logo.png0.50KB0.37KB▼ 24.61%
images/small_logo3.png0.51KB0.38KB▼ 26.15%