84% restore-post-format-icons

Code Review | Restore Post Format Icons

WordPress plugin Restore Post Format Icons scored84%from 54 tests.

About plugin

  • Plugin page: restore-post-form...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Jul 13, 2019
  • Latest release: May 7, 2021
  • Number of updates: 4
  • Update frequency: every 166.5 days
  • Top authors: SergeyBiryukov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,572 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
Install script ran successfully

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

A check of server-side resources used by Restore Post Format Icons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.23 ▼1.02
Dashboard /wp-admin3.31 ▲0.0151.66 ▲0.29
Posts /wp-admin/edit.php3.36 ▲0.0148.22 ▼0.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.76 ▼0.55
Media Library /wp-admin/upload.php3.23 ▲0.0038.26 ▲1.41

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Restore Post Format Icons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.26 ▼1.031.74 ▼0.1944.80 ▲4.37
Dashboard /wp-admin2,221 ▲184.85 ▼0.02103.51 ▲0.7243.10 ▼4.74
Posts /wp-admin/edit.php2,112 ▲122.00 ▼0.0236.66 ▼4.4834.05 ▼0.35
Add New Post /wp-admin/post-new.php1,526 ▼1417.70 ▼5.60630.15 ▼65.4062.64 ▼4.50
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.1196.78 ▼16.3041.75 ▼5.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/restore-post-format-icons/restore-post-format-icons.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: posts, post formats, icons

restore-post-format-icons/restore-post-format-icons.php Passed 13 tests

This is the main PHP file of "Restore Post Format Icons" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Restores post format icons in list tables, removed in WordPress 5.2.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected37 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112737

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

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