84% tainacan-url-metadata-type

Code Review | Tainacan URL Metadata Type

WordPress plugin Tainacan URL Metadata Type scored84%from 54 tests.

About plugin

  • Plugin page: tainacan-url-meta...
  • Plugin version: 0.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 17, 2020
  • Latest release: Aug 24, 2022
  • Number of updates: 17
  • Update frequency: every 37.9 days
  • Top authors: tainacan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,779 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.00MB] [CPU: ▼4.65ms] Passed 4 tests

Server-side resources used by Tainacan URL Metadata Type
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.51 ▼1.95
Dashboard /wp-admin3.31 ▼0.0356.26 ▼7.63
Posts /wp-admin/edit.php3.36 ▲0.0149.95 ▲0.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.76 ▼2.99
Media Library /wp-admin/upload.php3.24 ▲0.0135.96 ▼6.01

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Tainacan URL Metadata Type
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.312.02 ▲0.4644.43 ▲1.92
Dashboard /wp-admin2,198 ▲245.62 ▲0.0189.36 ▼3.6144.86 ▲1.90
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0734.87 ▼0.9536.13 ▼2.51
Add New Post /wp-admin/post-new.php1,526 ▼923.63 ▲5.38600.69 ▼30.4751.46 ▼22.40
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0296.94 ▼15.6342.11 ▼6.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tainacan-url-metadata-type/tainacan-metadata-type-url.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Tainacan\\Metadata_Types\\Metadata_Type' not found in wp-content/plugins/tainacan-url-metadata-type/metadata_type/metadata-type.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: museums, archives, repository, glam, embed...

tainacan-url-metadata-type/tainacan-metadata-type-url.php 85% from 13 tests

Analyzing the main PHP file in "Tainacan URL Metadata Type" version 0.1.1
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tainacan-url-metadata-type.php" instead of "tainacan-metadata-type-url.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected299 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24447162
JavaScript250119
CSS10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity5.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin