78% anhlinh-thuoc-lo-ban

Code Review | Anhlinh Thuoc Lo Ban

WordPress plugin Anhlinh Thuoc Lo Ban scored78%from 54 tests.

About plugin

  • Plugin page: anhlinh-thuoc-lo-ban
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 6.3.1
  • First release: Sep 10, 2021
  • Latest release: Sep 10, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: thanhansoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /499 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.27ms] Passed 4 tests

This is a short check of server-side resources used by Anhlinh Thuoc Lo Ban
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.76 ▼7.54
Dashboard /wp-admin3.31 ▲0.0045.07 ▼2.91
Posts /wp-admin/edit.php3.36 ▲0.0044.85 ▼3.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.36 ▼18.60
Media Library /wp-admin/upload.php3.23 ▲0.0031.66 ▼3.52

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 159 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Anhlinh Thuoc Lo Ban
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.16 ▼1.612.13 ▲0.4543.37 ▲4.54
Dashboard /wp-admin2,203 ▲154.88 ▼1.02111.66 ▲2.0139.71 ▼6.21
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0341.06 ▼0.2936.74 ▼0.29
Add New Post /wp-admin/post-new.php1,542 ▲2318.15 ▼4.95597.73 ▼69.8563.69 ▲7.48
Media Library /wp-admin/upload.php1,391 ▲64.21 ▲0.0194.62 ▼10.4941.53 ▼2.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php
  • 154× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 29
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 231
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 124
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 215
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 104
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 59
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 150
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 224
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 120
    • > PHP Warning
      Use of undefined constant ALTLB_URL - assumed 'ALTLB_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/anhlinh-thuoc-lo-ban/views/index.php on line 156

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: anh linh thuoc lo ban, thuoc lo ban wordpress, thc l ban plugin

anhlinh-thuoc-lo-ban/anhlinh-thuoc-lo-ban.php 92% from 13 tests

The entry point to "Anhlinh Thuoc Lo Ban" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin474 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP389328
JavaScript2151146

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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 functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
150 PNG files occupy 5.22MB with 2.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/images/thuoc522-27.png41.21KB22.11KB▼ 46.33%
views/images/thuoc429-31.png37.47KB20.81KB▼ 44.45%
views/images/thuoc522-33.png40.79KB22.03KB▼ 46.00%
views/images/thuoc388-19.png40.49KB22.02KB▼ 45.62%
views/images/thuoc522-26.png41.30KB22.38KB▼ 45.82%