84% currency-code

Code Review | Currency Code

WordPress plugin Currency Code scored84%from 54 tests.

About plugin

  • Plugin page: currency-code
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Nov 8, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: stevenkellow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,012 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.02MB] [CPU: ▲0.87ms] Passed 4 tests

An overview of server-side resources used by Currency Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.43 ▲0.27
Dashboard /wp-admin3.33 ▲0.0259.37 ▲9.08
Posts /wp-admin/edit.php3.38 ▲0.0253.45 ▲2.81
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.29 ▼3.72
Media Library /wp-admin/upload.php3.26 ▲0.0239.24 ▲4.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Currency Code
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.30 ▼1.369.48 ▲7.4640.50 ▼10.08
Dashboard /wp-admin2,195 ▲155.57 ▼0.1086.06 ▼6.7640.40 ▼2.13
Posts /wp-admin/edit.php2,100 ▲31.95 ▼0.0739.41 ▲2.1536.58 ▼2.62
Add New Post /wp-admin/post-new.php1,526 ▼323.54 ▲0.22609.11 ▼76.8746.13 ▼15.16
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.00103.59 ▼5.4545.24 ▼1.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_currency_code_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/currency-code/currency-code.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/currency-code/currency-widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: shortcode, dollars, conversion, widget, currency

currency-code/currency-code.php Passed 13 tests

Analyzing the main PHP file in "Currency Code" version 0.1
45 characters long description:
Simple shortcode to return live currency info

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected250 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23334156
Markdown126069
JavaScript313225

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin