10% markup-to-featured-image

Code Review | Markup to Featured Image

WordPress plugin Markup to Featured Image scored10%from 54 tests.

About plugin

  • Plugin page: markup-to-feature...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2012
  • Latest release: Oct 14, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Beckism (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,649 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Compile error in wp-content/plugins/markup-to-featured-image/markup-to-featured-image.php+124
    'break' not in the 'loop' or 'switch' context

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

A check of server-side resources used by Markup to Featured Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.64 ▼0.87
Dashboard /wp-admin3.31 ▼0.0448.94 ▼12.90
Posts /wp-admin/edit.php3.36 ▲0.0046.34 ▼4.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.63 ▼9.21
Media Library /wp-admin/upload.php3.23 ▲0.0037.87 ▼3.60

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Markup to Featured Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.191.77 ▼0.3040.01 ▼2.35
Dashboard /wp-admin2,198 ▲185.63 ▼0.0494.03 ▲2.4739.71 ▲0.14
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0940.75 ▲2.2934.65 ▼2.08
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▲0.18677.86 ▲3.8562.77 ▲12.12
Media Library /wp-admin/upload.php1,394 ▼04.21 ▲0.02101.59 ▼2.1545.13 ▲1.27

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 no errors were found, this is by no means 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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      'break' not in the 'loop' or 'switch' context in wp-content/plugins/markup-to-featured-image/markup-to-featured-image.php on line 124

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: featured image, image, featured, posts, post...

markup-to-featured-image/markup-to-featured-image.php Passed 13 tests

The main PHP script in "Markup to Featured Image" version 1.0 is automatically included on every request by WordPress
88 characters long description:
Automatically set the featured image for a post based on custom markup in the body text.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin114 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13876114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin