83% gridpics

Code Review | GridPics

WordPress plugin GridPics scored83%from 54 tests.

About plugin

  • Plugin page: gridpics
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Apr 7, 2014
  • Latest release: Apr 17, 2014
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: konduit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /874 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.85ms] Passed 4 tests

This is a short check of server-side resources used by GridPics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1045.57 ▲6.43
Dashboard /wp-admin3.40 ▲0.0550.15 ▼9.51
Posts /wp-admin/edit.php3.51 ▲0.1548.69 ▼5.45
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.56 ▼22.86
Media Library /wp-admin/upload.php3.32 ▲0.0942.96 ▲6.60
Add New /wp-admin/post-new.php?post_type=gridpic3.3747.62
GridPics /wp-admin/edit.php?post_type=gridpic3.3641.47

Server storage [IO: ▲0.59MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/gridpics/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for GridPics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲15713.93 ▼0.459.81 ▲7.7746.38 ▲6.68
Dashboard /wp-admin2,248 ▲455.83 ▲0.95101.33 ▲3.1541.04 ▼2.25
Posts /wp-admin/edit.php2,127 ▲272.12 ▲0.1134.81 ▼5.6034.41 ▼4.08
Add New Post /wp-admin/post-new.php1,578 ▲4723.12 ▲0.05675.70 ▼64.0957.58 ▼4.42
Media Library /wp-admin/upload.php1,430 ▲394.26 ▲0.04109.56 ▲11.6147.74 ▲1.97
Add New /wp-admin/post-new.php?post_type=gridpic1,6293.5864.7931.12
GridPics /wp-admin/edit.php?post_type=gridpic1,0711.9929.7829.88

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gridpics/CPT.php:289

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (The GridPics edit screen), #2 (A view of all upload pictures into GridPics), #3 (The output of [gridpics rows="2" columns="2"])
Please take inspiration from this readme.txt

gridpics/gridPic.php 92% from 13 tests

The main PHP file in "GridPics" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gridpics.php" instead of "gridPic.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
No dangerous file extensions were detected515 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2408357435
CSS11042
JavaScript11038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.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 files were detected