78% insert-tags

Code Review | insert tags

WordPress plugin insert tags scored78%from 54 tests.

About plugin

  • Plugin page: insert-tags
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 26, 2017
  • Latest release: Oct 28, 2017
  • Number of updates: 15
  • Update frequency: every 5.5 days
  • Top authors: grandebogdan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by insert tags
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.55 ▼7.00
Dashboard /wp-admin3.33 ▲0.0250.60 ▲1.31
Posts /wp-admin/edit.php3.38 ▲0.0250.98 ▼2.13
Add New Post /wp-admin/post-new.php5.91 ▲0.02103.70 ▲9.55
Media Library /wp-admin/upload.php3.25 ▲0.0235.74 ▼0.33
settings insert tags /wp-admin/options-general.php?page=inserttags3.1930.64

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by insert tags
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.58 ▼0.791.69 ▼0.4541.66 ▼1.97
Dashboard /wp-admin2,210 ▲224.83 ▼0.08109.72 ▲3.0438.02 ▼8.11
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0039.92 ▲1.5435.39 ▼0.71
Add New Post /wp-admin/post-new.php1,536 ▲1923.11 ▲5.52601.57 ▼36.9054.58 ▲4.77
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0099.53 ▼0.0842.61 ▼1.90
settings insert tags /wp-admin/options-general.php?page=inserttags6891.536.6617.77

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=inserttags
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/insert-tags/inserttags.php on line 62 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/insert-tags/inserttags.php(62): do_settings_fields()
    #1 wp-includes/class-wp-hook.php(310): inserttags->inserttags_option_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please 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/insert-tags/inserttags.php:30

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

insert-tags/inserttags.php 92% from 13 tests

The entry point to "insert tags" version 0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("insert-tags.php" instead of "inserttags.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected92 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1342692

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.29MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
post.png77.98KB30.74KB▼ 60.58%
activated.png80.47KB33.04KB▼ 58.94%
settings.png59.29KB23.78KB▼ 59.90%
install.png82.86KB33.87KB▼ 59.13%