84% automatic-tags

Code Review | Automatic Tags

WordPress plugin Automatic Tags scored84%from 54 tests.

About plugin

  • Plugin page: automatic-tags
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.0
  • WordPress version: 6.3.1
  • First release: Aug 13, 2020
  • Latest release: Aug 6, 2021
  • Number of updates: 4
  • Update frequency: every 89.5 days
  • Top authors: chiefastro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /649 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.04MB] [CPU: ▼11.29ms] Passed 4 tests

Server-side resources used by Automatic Tags
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.07 ▼2.63
Dashboard /wp-admin3.39 ▲0.0450.15 ▼10.43
Posts /wp-admin/edit.php3.50 ▲0.1448.93 ▲2.20
Add New Post /wp-admin/post-new.php5.53 ▼0.3672.40 ▼30.94
Media Library /wp-admin/upload.php3.31 ▲0.0832.60 ▼1.15
Automatic Tags /wp-admin/options-general.php?page=wpautotag-settings3.2832.16

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Automatic Tags: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.26 ▼1.144.32 ▲2.5538.14 ▼3.77
Dashboard /wp-admin2,215 ▲275.83 ▲0.93107.06 ▼12.1139.18 ▼8.34
Posts /wp-admin/edit.php2,095 ▲92.04 ▲0.0339.55 ▲3.8535.63 ▼3.01
Add New Post /wp-admin/post-new.php6,261 ▲4,71926.10 ▲7.67822.11 ▲202.7258.85 ▲0.87
Media Library /wp-admin/upload.php1,397 ▲64.29 ▲0.0898.50 ▲1.6242.90 ▼3.79
Automatic Tags /wp-admin/options-general.php?page=wpautotag-settings9422.1424.3332.06

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 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)
Even though everything seems fine, this is not 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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/automatic-tags/wpautotag.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-tags/callbacks.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: categories, nlp, machine learning, natural language processing, suggestions...

automatic-tags/wpautotag.php 92% from 13 tests

Analyzing the main PHP file in "Automatic Tags" version 0.1.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("automatic-tags.php" instead of "wpautotag.php")

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
Everything looks great! No dangerous files found in this plugin1,567 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44258742
JavaScript243105720
CSS131105

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions45
▷ Named functions2862.22%
▷ Anonymous functions1737.78%
Constants3
▷ Global constants3100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/tag.png9.02KB3.42KB▼ 62.12%