10% pixgridder

Code Review | PixGridder

WordPress plugin PixGridder scored10%from 54 tests.

About plugin

  • Plugin page: pixgridder
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2013
  • Latest release: Jun 17, 2015
  • Number of updates: 46
  • Update frequency: every 14.5 days
  • Top authors: manuelmasia (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

400+ active /37,473 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/pixgridder/lib/functions.php+560
    Uncaught Error: Using $this when not in object context in wp-content/plugins/pixgridder/lib/functions.php:560
    Stack trace:
    #0 wp-content/plugins/pixgridder/lib/functions.php(572): PixGridder::register_options()
    #1 wp-content/plugins/pixgridder/lib/functions.php(84): PixGridder::add_general()
    #2 wp-includes/class-wp-hook.php(310): PixGridder::activate()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.76ms] Passed 4 tests

A check of server-side resources used by PixGridder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.05 ▼0.21
Dashboard /wp-admin3.31 ▲0.0043.77 ▼4.45
Posts /wp-admin/edit.php3.36 ▲0.0041.53 ▼10.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.72 ▼15.11
Media Library /wp-admin/upload.php3.23 ▲0.0031.62 ▼0.83

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by PixGridder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.19 ▼0.162.02 ▲0.1046.15 ▲4.28
Dashboard /wp-admin2,192 ▲185.55 ▼0.0386.54 ▼4.3237.86 ▼4.55
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0434.77 ▼5.7428.80 ▼11.58
Add New Post /wp-admin/post-new.php1,546 ▲1122.91 ▲4.49637.21 ▲23.8254.59 ▼7.75
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0194.24 ▼6.1140.12 ▼5.22

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pixgridder/pixgridder.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/pixgridder/lib/pixgridder-builder.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/pixgridder/lib/admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Pixgridder output demo), #2 (Pixgridder UI - take a look to the description tab (2))
The official readme.txt is a good inspiration

pixgridder/pixgridder.php Passed 13 tests

"PixGridder" version 2.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
83 characters long description:
A simple page composer that splits your pages/posts into grid with columns and rows

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 detected9,016 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS6127503,777
SVG9003,152
JavaScript83531411,359
PHP5162164688
PO File1111140

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity75.00
▷ Minimum class complexity75.00
▷ Maximum class complexity75.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods32
▷ Static methods721.88%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/pixgridder-banner.png51.06KB23.49KB▼ 54.01%