84% moexrate

Code Review | MoExRate

WordPress plugin MoExRate scored84%from 54 tests.

About plugin

  • Plugin page: moexrate
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 17, 2015
  • Latest release: Jan 17, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: AndreyS. (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /927 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.62ms] Passed 4 tests

An overview of server-side resources used by MoExRate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.14 ▼4.23
Dashboard /wp-admin3.36 ▲0.0549.90 ▼8.75
Posts /wp-admin/edit.php3.41 ▲0.0549.44 ▼2.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0599.01 ▼7.16
Media Library /wp-admin/upload.php3.28 ▲0.0537.24 ▲0.23

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_moex_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for MoExRate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3114.60 ▲0.301.87 ▼0.3643.20 ▼1.06
Dashboard /wp-admin2,209 ▲214.89 ▲0.0396.57 ▼20.6338.72 ▼7.20
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0534.74 ▼3.9638.62 ▲2.89
Add New Post /wp-admin/post-new.php1,542 ▲722.91 ▲1.94595.32 ▼89.2459.34 ▲7.75
Media Library /wp-admin/upload.php1,382 ▼64.22 ▼0.0197.46 ▼5.0746.53 ▼2.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_moex_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/moexrate/img/moexrate.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/moexrate/moexrate.php:59

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 97% 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (This screen shot screenshot-1.jpg of use widget MoExRate on same theme)
The official readme.txt might help

moexrate/moexrate.php Passed 13 tests

The main file in "MoExRate" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
94 characters long description:
Виджет курса валют ММВБ на текущий день c динамикой.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin214 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13313167
CSS20047

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.25
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions2291.67%
▷ Anonymous functions28.33%
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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/euro.png3.24KB0.34KB▼ 89.53%
img/dollar.png3.30KB0.35KB▼ 89.36%