84% am-lich

Code Review | Am lich

WordPress plugin Am lich scored84%from 54 tests.

About plugin

  • Plugin page: am-lich
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: May 10, 2016
  • Latest release: Aug 8, 2016
  • Number of updates: 3
  • Update frequency: every 30.0 days
  • Top authors: quangnv11 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,183 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.46ms] Passed 4 tests

Server-side resources used by Am lich
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.23 ▲2.35
Dashboard /wp-admin3.32 ▲0.0150.40 ▼1.76
Posts /wp-admin/edit.php3.37 ▲0.0147.36 ▼5.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.61 ▼19.94
Media Library /wp-admin/upload.php3.24 ▲0.0133.68 ▼6.15

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_am_lich_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Am lich: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.021.78 ▲0.1743.60 ▲2.14
Dashboard /wp-admin2,192 ▲125.53 ▼0.1383.92 ▼5.1341.52 ▼1.00
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0138.40 ▼5.8235.46 ▼0.62
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▲0.07680.95 ▼15.1566.23 ▲14.76
Media Library /wp-admin/upload.php1,403 ▲64.22 ▼0.07100.32 ▼13.7643.99 ▼2.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_am_lich_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/am-lich/am-lich.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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: am lich, lich van su, lich viet nam, lich am, m lch...

am-lich/am-lich.php Passed 13 tests

This is the main PHP file of "Am lich" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
31 characters long description:
Widget Âm lịch by amlich.com

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
Success! There were no dangerous files found in this plugin94 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP227994

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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
No PNG files were detected