10% moldavian-currency-widget

Code Review | Moldavian Currency Widget

WordPress plugin Moldavian Currency Widget scored10%from 54 tests.

About plugin

  • Plugin page: moldavian-currenc...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Oct 19, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: xelens (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /666 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/moldavian-currency-widget/mdl-currency.php+253
    Function create_function() is deprecated

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

This is a short check of server-side resources used by Moldavian Currency Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.28 ▼35.88
Dashboard /wp-admin2.05 ▼1.305.33 ▼56.05
Posts /wp-admin/edit.php2.05 ▼1.316.00 ▼44.18
Add New Post /wp-admin/post-new.php2.05 ▼3.845.21 ▼98.42
Media Library /wp-admin/upload.php2.05 ▼1.185.24 ▼28.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_mdl-currency
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Moldavian Currency Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.91 ▼0.668.10 ▲6.3839.55 ▼4.08
Dashboard /wp-admin2,206 ▲294.82 ▼0.7588.79 ▼2.3138.32 ▼2.31
Posts /wp-admin/edit.php2,114 ▲112.25 ▲0.2241.09 ▲0.0437.96 ▲1.53
Add New Post /wp-admin/post-new.php1,539 ▲1323.13 ▼0.30654.42 ▼5.1558.10 ▼4.31
Media Library /wp-admin/upload.php1,414 ▲144.48 ▲0.33110.88 ▲3.8747.48 ▼0.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/moldavian-currency-widget/mdl-currency.php+253
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_mdl-currency
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/moldavian-currency-widget/views/widget.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/moldavian-currency-widget/views/widget.php on line 9
    • > PHP Notice
      Undefined variable: mdl_title_id in wp-content/plugins/moldavian-currency-widget/views/admin.php on line 4
    • > PHP Notice
      Undefined variable: currencies in wp-content/plugins/moldavian-currency-widget/views/widget.php on line 9
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/moldavian-currency-widget/views/widget.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/moldavian-currency-widget/views/admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires php: Version format is invalid
You can look at the official readme.txt

moldavian-currency-widget/mdl-currency.php 85% from 13 tests

The entry point to "Moldavian Currency Widget" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("moldavian-currency-widget.php" instead of "mdl-currency.php")

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 plugin5,127 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS42224,564
SVG100288
PHP37291143
PO File3151581
JavaScript5213348
LESS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin