83% post-formats

Code Review | Post Formats

WordPress plugin Post Formats scored83%from 54 tests.

About plugin

  • Plugin page: post-formats
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Jun 12, 2014
  • Latest release: Jun 12, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: silver530 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,104 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Post Formats
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0046.79 ▲6.51
Dashboard /wp-admin3.31 ▲0.0046.75 ▲2.77
Posts /wp-admin/edit.php3.36 ▲0.0048.01 ▲3.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.80 ▼8.32
Media Library /wp-admin/upload.php3.23 ▲0.0033.69 ▲2.23

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Post Formats: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.60 ▲0.071.74 ▲0.0547.93 ▲8.39
Dashboard /wp-admin2,195 ▲185.55 ▼0.1286.48 ▲0.6337.54 ▼7.76
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.33 ▼1.7735.20 ▼0.81
Add New Post /wp-admin/post-new.php1,526 ▼023.72 ▲0.69635.48 ▼42.2359.01 ▲4.15
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.0897.58 ▼3.6241.07 ▼4.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-formats/post-formats.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

post-formats/post-formats.php 92% from 13 tests

The entry point to "Post Formats" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected942 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File44101,349929
PHP2132913

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.79KB11.19KB▼ 50.89%