84% ty-gia-gia-vang

Code Review | Ty Gia & Gia Vang

WordPress plugin Ty Gia & Gia Vang scored 84% from 54 tests.

About plugin

  • Plugin page: ty-gia-gia-vang
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.6
  • WordPress version: 6.3.1
  • First release: Aug 17, 2015
  • Latest release: Jun 20, 2018
  • Number of updates: 14
  • Update frequency: every 74.3 days
  • Top authors: quangnv11 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,281 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.69ms] Passed 4 tests

This is a short check of server-side resources used by Ty Gia & Gia Vang
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.12 ▼5.72
Dashboard /wp-admin3.39 ▲0.0947.58 ▼0.43
Posts /wp-admin/edit.php3.44 ▲0.0850.70 ▲2.90
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.27 ▼3.52
Media Library /wp-admin/upload.php3.31 ▲0.0837.34 ▲3.06

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_ty_gia_gia_vang_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Ty Gia & Gia Vang
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.61 ▼0.771.60 ▼0.5143.34 ▲1.14
Dashboard /wp-admin2,206 ▲324.85 ▼0.99108.66 ▲8.5843.56 ▼2.50
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0340.01 ▼1.6835.64 ▲1.36
Add New Post /wp-admin/post-new.php1,535 ▲223.19 ▼0.03660.50 ▲6.3051.35 ▲5.55
Media Library /wp-admin/upload.php1,388 ▼34.19 ▲0.0195.44 ▼2.4541.23 ▼0.81

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_ty_gia_gia_vang_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ty-gia-gia-vang/ty-gia-gia-vang.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: ty gia, ty gia gia vang, ngan hang, gia vang, viet nam...

ty-gia-gia-vang/ty-gia-gia-vang.php Passed 13 tests

Analyzing the main PHP file in "Ty Gia & Gia Vang" version 1.3
46 characters long description:
Widget Tỷ giá & Giá Vàng by www.tygia.com

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin362 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25211362

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity14.25
▷ Minimum method complexity1.00
▷ Maximum method complexity34.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin