84% admin-posts-grid

Code Review | Admin Posts Grid

WordPress plugin Admin Posts Grid scored84%from 54 tests.

About plugin

  • Plugin page: admin-posts-grid
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 18, 2022
  • Latest release: Sep 10, 2023
  • Number of updates: 13
  • Update frequency: every 34.6 days
  • Top authors: cheritto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /856 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.32ms] Passed 4 tests

A check of server-side resources used by Admin Posts Grid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.34 ▼7.38
Dashboard /wp-admin3.36 ▲0.0550.50 ▼0.92
Posts /wp-admin/edit.php3.41 ▲0.0547.49 ▼3.86
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.08 ▼9.11
Media Library /wp-admin/upload.php3.28 ▲0.0540.71 ▲0.97

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Admin Posts Grid
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.37 ▼0.182.01 ▲0.0742.38 ▼3.50
Dashboard /wp-admin2,207 ▲335.54 ▼0.0986.86 ▲0.6943.07 ▲5.47
Posts /wp-admin/edit.php2,112 ▲122.06 ▲0.0441.23 ▲1.8835.22 ▼0.22
Add New Post /wp-admin/post-new.php1,562 ▲1723.14 ▼0.01646.73 ▼23.2872.61 ▲17.01
Media Library /wp-admin/upload.php1,412 ▲154.31 ▲0.1198.35 ▼20.9543.80 ▼3.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/admin-posts-grid/includes/class-wp-list-grid.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/admin-posts-grid/includes/wp-admin/edit.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Grid' not found in wp-content/plugins/admin-posts-grid/includes/class-wp-posts-list-grid.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: posts grid, grid, admin grid, admin theme, posts list...

admin-posts-grid/admin-grid.php 92% from 13 tests

The main file in "Admin Posts Grid" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("admin-posts-grid.php" instead of "admin-grid.php")

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 plugin2,653 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP85657962,059
JavaScript196200333
CSS15912261

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity47.00
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods3253.33%
▷ Protected methods2541.67%
▷ Private methods35.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin