78% arvand-post-grid

Code Review | Arvand Post Grid

WordPress plugin Arvand Post Grid scored78%from 54 tests.

About plugin

  • Plugin page: arvand-post-grid
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2021
  • Latest release: Sep 15, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: arvandwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by Arvand Post Grid
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.55 ▲2.82
Dashboard /wp-admin3.36 ▲0.0646.53 ▼1.26
Posts /wp-admin/edit.php3.48 ▲0.1247.03 ▲1.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.13 ▼1.98
Media Library /wp-admin/upload.php3.29 ▲0.0633.64 ▼2.39
Styles & Settings /wp-admin/admin.php?page=apg-options3.3031.79
General /wp-admin/admin.php?page=apg-general3.2632.24
Information /wp-admin/admin.php?page=apg-information3.2530.60

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Arvand Post Grid
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.24 ▼0.121.50 ▼0.1940.16 ▼0.19
Dashboard /wp-admin2,226 ▲465.65 ▲0.0292.83 ▲4.1542.95 ▼1.44
Posts /wp-admin/edit.php2,131 ▲342.04 ▲0.0038.48 ▲1.3835.90 ▲2.72
Add New Post /wp-admin/post-new.php1,565 ▲3918.17 ▼4.69661.76 ▲28.0863.08 ▲14.07
Media Library /wp-admin/upload.php1,425 ▲254.18 ▼0.0297.36 ▼3.6340.80 ▼3.44
Styles & Settings /wp-admin/admin.php?page=apg-options9462.0423.7427.54
General /wp-admin/admin.php?page=apg-general8871.9925.3627.59
Information /wp-admin/admin.php?page=apg-information8042.0323.9932.53

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/arvand-post-grid/index.php
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apg_post_header_options() in wp-content/plugins/arvand-post-grid/admin/forms/post-header.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apg_category_options() in wp-content/plugins/arvand-post-grid/admin/forms/post-category.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apg_excerpt_options() in wp-content/plugins/arvand-post-grid/admin/forms/post-excerpt.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apg_avatar_options() in wp-content/plugins/arvand-post-grid/admin/forms/post-avatar.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apg_post_image_options() in wp-content/plugins/arvand-post-grid/admin/forms/post-image.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/arvand-post-grid/admin/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arvand-post-grid/includes/admin/menu-page.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apg_pagination_options() in wp-content/plugins/arvand-post-grid/admin/forms/pagination.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/arvand-post-grid/admin/information-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apg_footer_options() in wp-content/plugins/arvand-post-grid/admin/forms/post-footer.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (The first screenshot of the posts), #2 (The second screenshot of the posts), #3 (Screenshot of WordPress panel settings)
The official readme.txt is a good inspiration

arvand-post-grid/arvand-post-grid.php 92% from 13 tests

"Arvand Post Grid" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin2,627 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP23463582,617
CSS21610

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 1.73MB with 1.22MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png883.01KB266.33KB▼ 69.84%
screenshot-1.png892.21KB259.08KB▼ 70.96%