78% mojito-sinpe

Code Review | Mojito Sinpe

WordPress plugin Mojito Sinpe scored78%from 54 tests.

About plugin

  • Plugin page: mojito-sinpe
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Aug 3, 2023
  • Number of updates: 15
  • Update frequency: every 73.7 days
  • Top authors: marodok (66.67%)quantumdev (40%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /3,600 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼4.72ms] Passed 4 tests

An overview of server-side resources used by Mojito Sinpe
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3336.79 ▼11.49
Dashboard /wp-admin3.63 ▲0.3346.63 ▲1.49
Posts /wp-admin/edit.php3.68 ▲0.3347.03 ▼4.85
Add New Post /wp-admin/post-new.php6.15 ▲0.2694.46 ▼1.78
Media Library /wp-admin/upload.php3.49 ▲0.2636.20 ▼0.75

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 327 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Mojito Sinpe
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.33 ▼1.131.68 ▼0.8441.96 ▼5.30
Dashboard /wp-admin2,220 ▲294.86 ▲0.01100.40 ▲1.0140.62 ▼2.21
Posts /wp-admin/edit.php2,106 ▲141.96 ▼0.1739.61 ▼2.7139.37 ▲1.91
Add New Post /wp-admin/post-new.php1,379 ▼16517.38 ▼0.83559.81 ▼80.8938.65 ▼12.52
Media Library /wp-admin/upload.php1,399 ▲114.29 ▲0.0297.19 ▲1.0540.34 ▼5.13

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mojito-sinpe/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php
    • > /wp-content/plugins/mojito-sinpe/public/partials/mojito-sinpe-public-display.php
    • > /wp-content/plugins/mojito-sinpe/vendor/mustangostang/spyc/examples/yaml-load.php
    • > /wp-content/plugins/mojito-sinpe/vendor/mustangostang/spyc/php4/5to4.php
  • 118× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\Client\\ClientParserAbstract' not found in wp-content/plugins/mojito-sinpe/vendor/piwik/device-detector/Parser/Client/Browser.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/mojito-sinpe/vendor/hisorange/browser-detect/src/Facade.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Jaybizzle\\CrawlerDetect\\Fixtures\\AbstractProvider' not found in wp-content/plugins/mojito-sinpe/vendor/jaybizzle/crawler-detect/src/Fixtures/Headers.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\Client\\ClientParserAbstract' not found in wp-content/plugins/mojito-sinpe/vendor/piwik/device-detector/Parser/Client/MobileApp.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'hisorange\\BrowserDetect\\Test\\TestCase' not found in wp-content/plugins/mojito-sinpe/vendor/hisorange/browser-detect/tests/Stages/UAParserTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'hisorange\\BrowserDetect\\Exceptions\\Exception' not found in wp-content/plugins/mojito-sinpe/vendor/hisorange/browser-detect/src/Exceptions/RuntimeException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'DeviceDetector\\Cache\\Cache' not found in wp-content/plugins/mojito-sinpe/vendor/piwik/device-detector/Cache/StaticCache.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/mojito-sinpe/includes/class-mojito-sinpe-gateway.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'DeviceDetector\\Cache\\Cache' not found in wp-content/plugins/mojito-sinpe/vendor/piwik/device-detector/Cache/PSR6Bridge.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Pipeline\\PipelineInterface' not found in wp-content/plugins/mojito-sinpe/vendor/league/pipeline/src/Pipeline.php:6

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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: woocommerce payment, payment, costa rica, woocommerce, multisite...

mojito-sinpe/mojito-sinpe.php 92% from 13 tests

The entry point to "Mojito Sinpe" version 1.0.8 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin71,188 lines of code in 282 files:
LanguageFilesBlank linesComment linesLines of code
YAML524,3753,13547,679
PHP1832,8317,24720,497
Markdown1961101,536
JSON1500922
PO File292118236
XML51813125
HTML18193
JavaScript123057
Bourne Shell111029
Dockerfile1128
CSS1045
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity9.34
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces28
Interfaces13
Traits1
Classes144
▷ Abstract classes149.72%
▷ Concrete classes13090.28%
▷ Final classes53.85%
Methods871
▷ Static methods11413.09%
▷ Public methods70781.17%
▷ Protected methods859.76%
▷ Private methods799.07%
Functions35
▷ Named functions1234.29%
▷ Anonymous functions2365.71%
Constants64
▷ Global constants34.69%
▷ Class constants6195.31%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/sinpe-movil-50x28.png0.77KB0.25KB▼ 67.22%
public/img/sinpe-movil.png9.28KB9.68KB0.00%
public/img/sinpe-movil-100x55.png1.13KB0.47KB▼ 58.02%
public/img/sinpe-movil-300x165.png3.26KB1.50KB▼ 53.98%
public/img/sinpe-movil-400x220.png4.78KB2.19KB▼ 54.18%