78% hep-display-posts

Code Review | HEP Display Posts

WordPress plugin HEP Display Posts scored 78% from 54 tests.

About plugin

  • Plugin page: hep-display-posts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.25-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 13, 2023
  • Latest release: Feb 13, 2023
  • Number of updates: 3
  • Update frequency: every 3.7 days
  • Top authors: hridoy35 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 99 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.88ms] Passed 4 tests

An overview of server-side resources used by HEP Display Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0841.24 ▼1.99
Dashboard /wp-admin3.38 ▲0.0758.11 ▲6.13
Posts /wp-admin/edit.php3.43 ▲0.0746.86 ▼3.90
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.31 ▼18.24
Media Library /wp-admin/upload.php3.30 ▲0.0735.49 ▲0.61

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_hep_display_posts_widget
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for HEP Display Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.22 ▼1.171.71 ▼0.5247.18 ▼0.30
Dashboard /wp-admin2,208 ▲175.80 ▲0.9394.01 ▼5.9938.88 ▼5.20
Posts /wp-admin/edit.php2,091 ▲22.01 ▼0.0533.96 ▼6.5935.12 ▲0.66
Add New Post /wp-admin/post-new.php1,530 ▼1223.28 ▲5.00603.73 ▼11.0863.14 ▲4.21
Media Library /wp-admin/upload.php1,390 ▼14.17 ▼0.0694.16 ▼1.1439.61 ▼4.18

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_hep_display_posts_widget
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hep-display-posts/templates/style1/style1.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hep-display-posts/hep-display-posts.php:22
    • > PHP Notice
      Undefined variable: hep_posts in wp-content/plugins/hep-display-posts/templates/style1/style1.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/hep-display-posts/templates/style1/style1.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: display posts, display-posts, latest posts, posts, latest-posts

hep-display-posts/hep-display-posts.php 92% from 13 tests

This is the main PHP file of "HEP Display Posts" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected522 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP26385339
CSS33819183

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.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%
Functions7
▷ Named functions7100.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/no-image-available.png5.99KB4.30KB▼ 28.22%
assets/screenshot-1.png14.18KB6.72KB▼ 52.59%
assets/screenshot-2.png14.41KB7.78KB▼ 46.02%
assets/screenshot-3.png18.72KB10.17KB▼ 45.67%