84% tiengvietio

Code Review | TiengVietIO

WordPress plugin TiengVietIO scored84%from 54 tests.

About plugin

  • Plugin page: tiengvietio
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Sep 24, 2021
  • Latest release: Oct 2, 2021
  • Number of updates: 9
  • Update frequency: every 0.9 days
  • Top authors: tiengvietio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /589 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.27ms] Passed 4 tests

Analyzing server-side resources used by TiengVietIO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.09 ▲0.24
Dashboard /wp-admin3.39 ▲0.0944.51 ▼2.81
Posts /wp-admin/edit.php3.44 ▲0.0846.10 ▲2.59
Add New Post /wp-admin/post-new.php5.97 ▲0.0989.94 ▼1.12
Media Library /wp-admin/upload.php3.32 ▲0.0937.97 ▲2.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by TiengVietIO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲7213.23 ▼1.061.69 ▼0.1139.27 ▲1.01
Dashboard /wp-admin2,227 ▲385.85 ▼0.0598.21 ▼27.3885.83 ▲42.43
Posts /wp-admin/edit.php2,111 ▲251.95 ▼0.0438.63 ▲1.8833.68 ▲3.02
Add New Post /wp-admin/post-new.php6,412 ▲4,87922.50 ▼0.811,014.52 ▲391.6377.97 ▲20.16
Media Library /wp-admin/upload.php1,398 ▲104.19 ▼0.0599.37 ▲0.6780.00 ▲37.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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
Everything seems fine, however 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tiengvietio/TVAudit.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tiengvietio/inc/main.php:2

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: audit, google, seo, content

tiengvietio/TVAudit.php 92% from 13 tests

The main PHP script in "TiengVietIO" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tiengvietio.php" instead of "TVAudit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin513 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP446469
CSS10044

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/images/logo-plugin.png3.01KB0.47KB▼ 84.23%