10% asoriba-payments

Code Review | Asoriba

WordPress plugin Asoriba scored10%from 54 tests.

About plugin

  • Plugin page: asoriba-payments
  • Plugin version: 1.0.55
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.5
  • WordPress version: 6.3.1
  • First release: May 21, 2016
  • Latest release: Apr 26, 2017
  • Number of updates: 40
  • Update frequency: every 8.6 days
  • Top authors: asoriba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,227 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/asoriba-payments/asoriba-payments.php+814
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼58.88ms] Passed 4 tests

An overview of server-side resources used by Asoriba
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.04 ▼39.51
Dashboard /wp-admin2.05 ▼1.305.56 ▼56.86
Posts /wp-admin/edit.php2.05 ▼1.317.72 ▼41.87
Add New Post /wp-admin/post-new.php2.05 ▼3.846.38 ▼97.29
Media Library /wp-admin/upload.php2.05 ▼1.185.85 ▼30.85
Dashboard /wp-admin/admin.php?page=asoriba_menu_page_slug2.057.01
Settings /wp-admin/admin.php?page=asoriba_key_slug2.055.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_asoriba-payments
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Asoriba
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16413.57 ▼0.9812.31 ▲10.4658.30 ▲15.23
Dashboard /wp-admin2,207 ▲365.57 ▼0.0394.40 ▲4.0688.52 ▲47.22
Posts /wp-admin/edit.php2,127 ▲272.00 ▼0.0035.31 ▲1.0135.05 ▲1.40
Add New Post /wp-admin/post-new.php1,556 ▲2023.35 ▲0.45789.75 ▲131.4554.52 ▲9.14
Media Library /wp-admin/upload.php1,424 ▲274.27 ▼0.05110.42 ▲3.9185.73 ▲40.06
Dashboard /wp-admin/admin.php?page=asoriba_menu_page_slug8572.0324.7025.31
Settings /wp-admin/admin.php?page=asoriba_key_slug1,0092.0824.8327.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/asoriba-payments/asoriba-payments.php+814
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_asoriba-payments
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=asoriba_key_slug
    • > Deprecated in wp-content/plugins/asoriba-payments/asoriba-payments.php+814
    Function create_function() is deprecated
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=asoriba_menu_page_slug
    • > Notice in wp-content/plugins/asoriba-payments/asoriba-payments.php+152
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=asoriba_menu_page_slug
    • > Warning in wp-content/plugins/asoriba-payments/asoriba-payments.php+214
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/asoriba-payments/views/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/asoriba-payments/views/widget.php:3

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (An Asoriba form in the sidebar of the Twenty Fifteen theme.)
The official readme.txt might help

asoriba-payments/asoriba-payments.php 92% from 13 tests

Analyzing the main PHP file in "Asoriba" version 1.0.55
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 209 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 plugin1,215 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP390142957
CSS13615152
JavaScript11913106

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/images/icon.png1.12KB1.03KB▼ 7.60%
views/images/logo.png21.72KB9.86KB▼ 54.63%