78% wc-currency-pesetas

Code Review | add-currency-pesetas

WordPress plugin add-currency-pesetas scored78%from 54 tests.

About plugin

  • Plugin page: wc-currency-pesetas
  • Plugin version: 0.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 23, 2020
  • Latest release: May 23, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: faustorm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by add-currency-pesetas
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.72 ▼5.92
Dashboard /wp-admin3.31 ▲0.0045.56 ▼11.72
Posts /wp-admin/edit.php3.36 ▲0.0052.23 ▼4.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.53 ▼8.56
Media Library /wp-admin/upload.php3.23 ▲0.0040.74 ▲2.70

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for add-currency-pesetas
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.281.56 ▼0.2041.87 ▲2.31
Dashboard /wp-admin2,192 ▲155.56 ▼0.1097.41 ▲1.4341.84 ▼5.23
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0439.67 ▼5.9435.79 ▼0.23
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.17623.71 ▼47.9450.23 ▼5.97
Media Library /wp-admin/upload.php1,400 ▲34.26 ▲0.14100.39 ▼17.0645.06 ▼5.07

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

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

Smoke tests 50% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-currency-pesetas/index.php
    • > /wp-content/plugins/wc-currency-pesetas/public/index.php
    • > /wp-content/plugins/wc-currency-pesetas/admin/index.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-currency-pesetas/add-currency-pesetas.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/wc-currency-pesetas/add-currency-pesetas.php:14
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wc-currency-pesetas/add-currency-pesetas.php on line 13
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wc-currency-pesetas/add-currency-pesetas.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: currency, woocommerce

wc-currency-pesetas/add-currency-pesetas.php 92% from 13 tests

The principal PHP file in "add-currency-pesetas" v. 0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-currency-pesetas.php" instead of "add-currency-pesetas.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin37 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP371436
Markdown1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin