84% wp-uf2

Code Review | Microformats 2

WordPress plugin Microformats 2 scored84%from 54 tests.

About plugin

  • Plugin page: wp-uf2
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Jun 23, 2017
  • Latest release: Feb 18, 2018
  • Number of updates: 6
  • Update frequency: every 40.3 days
  • Top authors: pfefferle (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /5,630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by Microformats 2
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /45.45 ▲41.948,647,667.54 ▲8,647,623.69
Dashboard /wp-admin3.39 ▼0.0051.60 ▼15.77
Posts /wp-admin/edit.php3.50 ▲0.1054.13 ▲2.81
Add New Post /wp-admin/post-new.php5.97 ▲0.04101.24 ▼13.83
Media Library /wp-admin/upload.php3.31 ▲0.0441.66 ▲6.54

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Microformats 2
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.19 ▼0.191.85 ▼0.0639.81 ▼4.27
Dashboard /wp-admin2,198 ▲185.62 ▼0.0485.66 ▼15.3841.59 ▼7.15
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0240.71 ▲0.5738.57 ▲3.91
Add New Post /wp-admin/post-new.php1,536 ▲823.21 ▲0.13645.27 ▼64.8951.24 ▼7.59
Media Library /wp-admin/upload.php1,400 ▼04.08 ▼0.15114.21 ▲12.4448.29 ▲6.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please 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/wp-uf2/wp-uf2.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/wp-uf2/includes/genesis.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
2 plugin tags: microformats, indieweb

wp-uf2/wp-uf2.php Passed 13 tests

Analyzing the main PHP file in "Microformats 2" version 1.1.0
67 characters long description:
Adds Microformats 2 support to your WordPress installation or theme

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

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods18
▷ Static methods1477.78%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
PNG images were not found in this plugin