84% ty-gia-vang-ngoai-te

Code Review | Web Tỷ Giá

WordPress plugin Web Tỷ Giá scored84%from 54 tests.

About plugin

  • Plugin page: ty-gia-vang-ngoai-te
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.7.2
  • WordPress version: 6.3.1
  • First release: May 17, 2021
  • Latest release: Jun 17, 2022
  • Number of updates: 6
  • Update frequency: every 66.2 days
  • Top authors: overnight21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /722 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.08MB] [CPU: ▼0.79ms] Passed 4 tests

This is a short check of server-side resources used by Web Tỷ Giá
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.05 ▼1.08
Dashboard /wp-admin3.38 ▲0.0854.62 ▼0.71
Posts /wp-admin/edit.php3.44 ▲0.0851.67 ▲7.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.73 ▼2.18
Media Library /wp-admin/upload.php3.31 ▲0.0839.02 ▲0.79

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_ty_gia_vang_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Web Tỷ Giá
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.16 ▼0.192.05 ▼0.2347.40 ▲3.14
Dashboard /wp-admin2,195 ▲185.63 ▲0.0389.80 ▼1.0137.60 ▼5.90
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0638.33 ▲1.2835.88 ▲2.54
Add New Post /wp-admin/post-new.php1,528 ▼023.06 ▼0.11682.76 ▼5.8958.66 ▲5.46
Media Library /wp-admin/upload.php1,394 ▲34.18 ▼0.0198.00 ▲1.4044.32 ▲1.58

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_ty_gia_vang_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ty-gia-vang-ngoai-te/ty-gia-vang.php:15

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 93% 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:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

ty-gia-vang-ngoai-te/ty-gia-vang.php 92% from 13 tests

The primary PHP file in "Web Tỷ Giá" version 2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ty-gia-vang-ngoai-te.php" instead of "ty-gia-vang.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
No dangerous file extensions were detected535 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP29715408
JavaScript1309127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity72.00
▷ Minimum class complexity72.00
▷ Maximum class complexity72.00
Average method complexity18.75
▷ Minimum method complexity1.00
▷ Maximum method complexity40.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin