78% magical-posts-display

Code Review | Magical Posts Display – Elementor Advanced Posts widgets

WordPress plugin Magical Posts Display – Elementor Advanced Posts widgets scored78%from 54 tests.

About plugin

  • Plugin page: magical-posts-dis...
  • Plugin version: 1.2.33
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: May 28, 2019
  • Latest release: Dec 1, 2023
  • Number of updates: 85
  • Update frequency: every 19.4 days
  • Top authors: nalam (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

4,000+ active /138,703 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
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼1.65ms] Passed 4 tests

An overview of server-side resources used by Magical Posts Display – Elementor Advanced Posts widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2041.61 ▲2.80
Dashboard /wp-admin3.68 ▲0.3356.92 ▼4.68
Posts /wp-admin/edit.php3.73 ▲0.3751.39 ▲6.79
Add New Post /wp-admin/post-new.php6.21 ▲0.3294.47 ▼11.49
Media Library /wp-admin/upload.php3.52 ▲0.2942.06 ▲8.19

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,010 new files
Database: no new tables, 11 new options
New WordPress options
widget_mpdw-recent-posts
can_compress_scripts
mgposte_install_date
magical_ptab_home
theysaidso_admin_options
mgposte_plugin_activated
widget_recent-comments
mgposte_latest_activated
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Magical Posts Display – Elementor Advanced Posts widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,113 ▲36615.80 ▲1.0711.21 ▲9.3939.23 ▼4.38
Dashboard /wp-admin2,363 ▲1856.33 ▲0.62120.57 ▲13.6141.91 ▲1.62
Posts /wp-admin/edit.php2,294 ▲1943.72 ▲1.7049.72 ▲13.3533.42 ▼3.46
Add New Post /wp-admin/post-new.php1,757 ▲22124.58 ▲1.41601.38 ▼57.1936.85 ▼19.10
Media Library /wp-admin/upload.php1,431 ▲284.29 ▲0.0980.20 ▼20.9943.43 ▼1.64

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
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_mpdw-recent-posts
    • mgposte_install_date
    • mgposte_latest_activated
    • widget_recent-comments
    • mgposte_plugin_activated
    • widget_theysaidso_widget
    • magical_ptab_home
    • 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/magical-posts-display/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/magical-posts-display/admin/src/cmb2/apigen/hook-docs.php
  • 206× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/magical-posts-display/vendor/htmlburger/carbon-fields/core/Container/Post_Meta_Container.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/magical-posts-display/vendor/htmlburger/carbon-fields/core/Field/Checkbox_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/magical-posts-display/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Ancestor_ID_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/magical-posts-display/admin/mp-display-update-massage.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/magical-posts-display/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/magical-posts-display/admin/src/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/magical-posts-display/vendor/htmlburger/carbon-fields/core/Field/Radio_Image_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/magical-posts-display/admin/src/cmb2/example-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/magical-posts-display/admin/src/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Key_Value_Datastore' not found in wp-content/plugins/magical-posts-display/vendor/htmlburger/carbon-fields/core/Datastore/Theme_Options_Datastore.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #6 is missing in magical-posts-display/assets to your readme.txt
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

magical-posts-display/magical-posts-display.php Passed 13 tests

The primary PHP file in "Magical Posts Display – Elementor Advanced Posts widgets" version 1.2.33 is used by WordPress to initiate all plugin functionality
89 characters long description:
Show your site posts with many different styles by Elementor Widgets or Gutenberg blocks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected111,444 lines of code in 766 files:
LanguageFilesBlank linesComment linesLines of code
PHP2678,05416,26942,475
PO File14915,21719,61734,755
JavaScript2107,81111,87019,601
CSS381,6692,4759,798
Sass66696283,423
JSON900566
Markdown51270401
SVG202217298
XML161195
YAML16032

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.03
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces27
Interfaces6
Traits0
Classes234
▷ Abstract classes198.12%
▷ Concrete classes21591.88%
▷ Final classes31.40%
Methods1,804
▷ Static methods20611.42%
▷ Public methods1,46481.15%
▷ Protected methods30016.63%
▷ Private methods402.22%
Functions210
▷ Named functions11253.33%
▷ Anonymous functions9846.67%
Constants55
▷ Global constants1629.09%
▷ Class constants3970.91%
▷ Public constants39100.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
23 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/src/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
admin/src/cmb2/apigen/theme-bootstrap/src/resources/tree-vertical.png0.12KB0.08KB▼ 31.50%
admin/src/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
admin/src/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
admin/src/cmb2/apigen/theme-bootstrap/src/resources/collapsed.png0.24KB0.14KB▼ 41.77%