83% anwp-post-grid-for-elementor

Code Review | AnWP Post Grid and Post Carousel Slider for Elementor

WordPress plugin AnWP Post Grid and Post Carousel Slider for Elementor scored83%from 54 tests.

About plugin

  • Plugin page: anwp-post-grid-fo...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Jun 30, 2023
  • Number of updates: 25
  • Update frequency: every 46.9 days
  • Top authors: anwppro (100%)

Code review

54 tests

User reviews

83 reviews

Install metrics

20,000+ active /173,408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.53MB] [CPU: ▲3.51ms] Passed 4 tests

This is a short check of server-side resources used by AnWP Post Grid and Post Carousel Slider for Elementor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5845.40 ▲6.01
Dashboard /wp-admin3.88 ▲0.5753.26 ▼0.24
Posts /wp-admin/edit.php3.92 ▲0.5658.85 ▲4.72
Add New Post /wp-admin/post-new.php6.39 ▲0.50107.09 ▲8.05
Media Library /wp-admin/upload.php3.73 ▲0.5042.85 ▲3.55
Support /wp-admin/admin.php?page=anwp-post-grid-support3.7137.75
Welcome /wp-admin/admin.php?page=anwp-post-grid3.7137.90
Go Premium /wp-admin/admin.php?page=redirect-anwp-pg-elementor-premium3.5827.71
Settings /wp-admin/admin.php?page=anwp_pg_settings3.7750.77

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 125 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for AnWP Post Grid and Post Carousel Slider for Elementor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15214.25 ▼0.122.25 ▲0.6140.89 ▼2.18
Dashboard /wp-admin2,281 ▲1045.59 ▼0.1084.09 ▼4.6983.56 ▲37.26
Posts /wp-admin/edit.php2,187 ▲902.15 ▲0.1441.73 ▲3.1536.43 ▲0.81
Add New Post /wp-admin/post-new.php1,757 ▲21722.49 ▼0.31737.04 ▲53.5253.47 ▼6.45
Media Library /wp-admin/upload.php1,483 ▲834.21 ▲0.02103.25 ▼16.9465.16 ▲13.81
Support /wp-admin/admin.php?page=anwp-post-grid-support9302.1523.0131.63
Welcome /wp-admin/admin.php?page=anwp-post-grid8902.0224.3427.19
Go Premium /wp-admin/admin.php?page=redirect-anwp-pg-elementor-premium1,4785.59141.5466.81
Settings /wp-admin/admin.php?page=anwp_pg_settings1,4474.3076.2565.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-hero-block.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-classic-blog.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-simple-grid.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-flex-slider.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-light-grid.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-classic-slider.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-simple-slider.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Gamajo_Template_Loader' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-template.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/anwp-post-grid-for-elementor/includes/class-anwp-post-grid-element-classic-grid.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 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
10 plugin tags: posts grid, elementor, post grid, grid, elementor widget...

anwp-post-grid-for-elementor/anwp-post-grid.php 77% from 13 tests

The primary PHP file in "AnWP Post Grid and Post Carousel Slider for Elementor" version 1.2.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 151 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("anwp-post-grid-for-elementor.php" instead of "anwp-post-grid.php")

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 detected35,259 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
CSS1180213416,095
JavaScript81,2781,5179,834
PHP361,5182,8528,415
Sass14426485
Markdown21420376
SVG540054

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity29.57
▷ Minimum class complexity2.00
▷ Maximum class complexity223.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods162
▷ Static methods84.94%
▷ Public methods13281.48%
▷ Protected methods2112.96%
▷ Private methods95.56%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in 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
public/img/anwp-post-grid.png18.89KB4.46KB▼ 76.37%