84% demomentsomtres-display-posts-shortcode

Code Review | DeMomentSomTres Display Posts Shortcode

WordPress plugin DeMomentSomTres Display Posts Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-d...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.2
  • WordPress version: 6.3.1
  • First release: Nov 17, 2013
  • Latest release: May 15, 2015
  • Number of updates: 21
  • Update frequency: every 43.8 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,565 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.02ms] Passed 4 tests

An overview of server-side resources used by DeMomentSomTres Display Posts Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.54 ▼0.61
Dashboard /wp-admin3.38 ▲0.0349.51 ▼14.75
Posts /wp-admin/edit.php3.49 ▲0.1352.89 ▼0.61
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.51 ▼12.10
Media Library /wp-admin/upload.php3.30 ▲0.0741.25 ▲2.00

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for DeMomentSomTres Display Posts Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.24 ▼1.051.78 ▲0.0043.60 ▲5.58
Dashboard /wp-admin2,217 ▲254.86 ▼0.09111.04 ▲0.3740.82 ▼3.16
Posts /wp-admin/edit.php2,100 ▲82.00 ▼0.0240.62 ▲0.8635.75 ▼1.47
Add New Post /wp-admin/post-new.php1,547 ▲3323.21 ▲5.66679.16 ▼16.3354.46 ▼0.35
Media Library /wp-admin/upload.php1,402 ▲174.26 ▲0.04110.10 ▼5.1647.58 ▼5.40

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Good news, no errors were detected

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/demomentsomtres-display-posts-shortcode/demomentsomtres-display-posts-shortcode.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: display, pages, posts, page, shortcode...

demomentsomtres-display-posts-shortcode/demomentsomtres-display-posts-shortcode.php Passed 13 tests

"DeMomentSomTres Display Posts Shortcode" version 2.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Display a listing of posts using the [display-posts] shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin358 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161133358

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants18.33%
▷ Class constants1191.67%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin