90% apithanhtoan-ty-gia-ngan-hang

Code Review | Apithanhtoan Ty gia ngan hang

WordPress plugin Apithanhtoan Ty gia ngan hang scored90%from 54 tests.

About plugin

  • Plugin page: apithanhtoan-ty-g...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Mar 1, 2021
  • Latest release: Mar 1, 2021
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: apithanhtoan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.08ms] Passed 4 tests

Server-side resources used by Apithanhtoan Ty gia ngan hang
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.84 ▼0.38
Dashboard /wp-admin3.33 ▲0.0345.13 ▼4.63
Posts /wp-admin/edit.php3.38 ▲0.0247.43 ▼5.90
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.98 ▼10.62
Media Library /wp-admin/upload.php3.25 ▲0.0233.99 ▼3.16

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Apithanhtoan Ty gia ngan hang
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.47 ▲0.101.53 ▼0.1339.97 ▼1.91
Dashboard /wp-admin2,205 ▲175.80 ▼0.1096.86 ▼4.8938.62 ▼1.62
Posts /wp-admin/edit.php2,094 ▲82.04 ▲0.0140.20 ▲3.0537.81 ▲4.14
Add New Post /wp-admin/post-new.php1,530 ▲1123.37 ▲0.14607.05 ▼78.9467.05 ▼1.36
Media Library /wp-admin/upload.php1,390 ▲24.20 ▲0.0095.00 ▼13.4942.42 ▼3.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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: Screenshot #1 ([iframe] shortcode) image not found
The official readme.txt is a good inspiration

apithanhtoan-ty-gia-ngan-hang/apithanhtoan-ty-gia-ngan-hang.php Passed 13 tests

This is the main PHP file of "Apithanhtoan Ty gia ngan hang" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
99 characters long description:
[iframe src="https://apithanhtoan.com/iframe/ty-gia-ngan-hang" width="100%" height="600"] shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected142 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11812130
JavaScript10312

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/apithanhtoan-icon.png8.35KB0.69KB▼ 91.76%
screen-plugin-apithanhtoan-ty-gia-ngan-hang.png86.81KB30.97KB▼ 64.33%