84% pagos-moviles-peru

Code Review | YAPE A1 Tiendas

WordPress plugin YAPE A1 Tiendas scored84%from 54 tests.

About plugin

  • Plugin page: pagos-moviles-peru
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7
  • WordPress version: 6.3.1
  • First release: Jul 24, 2020
  • Latest release: May 27, 2021
  • Number of updates: 5
  • Update frequency: every 61.6 days
  • Top authors: carlitoxenlaweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /6,681 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by YAPE A1 Tiendas
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0056.35 ▲13.33
Dashboard /wp-admin3.31 ▲0.0048.58 ▼3.45
Posts /wp-admin/edit.php3.36 ▲0.0045.42 ▼3.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.77 ▼4.00
Media Library /wp-admin/upload.php3.23 ▲0.0033.93 ▼2.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for YAPE A1 Tiendas
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.34 ▼0.031.87 ▲0.0344.71 ▼5.11
Dashboard /wp-admin2,209 ▲204.86 ▼0.08103.99 ▼16.5141.19 ▼7.54
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0134.92 ▼3.1234.85 ▲2.82
Add New Post /wp-admin/post-new.php1,528 ▲918.64 ▼4.41599.85 ▼73.9749.98 ▼9.05
Media Library /wp-admin/upload.php1,388 ▲64.21 ▼0.0294.58 ▼2.5741.02 ▼4.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/pagos-moviles-peru/pagos-moviles-peru.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pagos-moviles-peru/pagos-moviles-peru.php on line 13
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pagos-moviles-peru/pagos-moviles-peru.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/pagos-moviles-peru/pagos-moviles-peru.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: pagos, yape, peru, yape peru, moviles

pagos-moviles-peru/pagos-moviles-peru.php 92% from 13 tests

"YAPE A1 Tiendas" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 215 characters long)

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
Success! There were no dangerous files found in this plugin741 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP37610365
PO File492109268
CSS110062
JavaScript18046

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.50
▷ Minimum class complexity4.00
▷ Maximum class complexity23.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png25.83KB11.56KB▼ 55.25%