10% xratetj

Code Review | XRateTJ

WordPress plugin XRateTJ scored10%from 54 tests.

About plugin

  • Plugin page: xratetj
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4
  • WordPress version: 6.3.1
  • First release: Feb 2, 2016
  • Latest release: Feb 3, 2016
  • Number of updates: 11
  • Update frequency: every 5.4 days
  • Top authors: code.tj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /482 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
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/xratetj/xratetj.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; xratetj has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼51.50ms] Passed 4 tests

Analyzing server-side resources used by XRateTJ
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.65 ▼35.31
Dashboard /wp-admin2.11 ▼1.196.43 ▼43.06
Posts /wp-admin/edit.php2.11 ▼1.258.39 ▼40.76
Add New Post /wp-admin/post-new.php2.11 ▼3.785.64 ▼86.87
Media Library /wp-admin/upload.php2.11 ▼1.125.20 ▼33.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_xratetj
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

XRateTJ: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.551.61 ▼0.0440.83 ▼4.29
Dashboard /wp-admin2,209 ▲244.83 ▼0.0398.98 ▼1.3844.15 ▼2.40
Posts /wp-admin/edit.php2,086 ▼02.06 ▲0.0139.01 ▼0.6833.94 ▼3.61
Add New Post /wp-admin/post-new.php1,534 ▼322.92 ▼0.44629.76 ▼75.1053.76 ▼5.12
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0296.41 ▼17.9341.13 ▼7.28

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/xratetj/xratetj.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; xratetj has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_xratetj
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
Everything seems fine, however this is by no means 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/xratetj/xratetj.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (XRateTJ widget plugin screenshot (widget on sidebar))
You can take inspiration from this readme.txt

xratetj/xratetj.php Passed 13 tests

The main file in "XRateTJ" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
35 characters long description:
Tajik somoni exchange rates plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin211 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22335211

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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%
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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.32KB6.10KB▼ 57.41%
img/agro/flag_us.png1.69KB0.71KB▼ 58.08%
img/agro/flag_eu.png1.58KB0.62KB▼ 60.67%
img/agro/flag_ru.png1.68KB0.70KB▼ 58.44%