73% codepicnic

Code Review | CodePicnic

WordPress plugin CodePicnic scored73%from 54 tests.

About plugin

  • Plugin page: codepicnic
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.7
  • WordPress version: 6.3.1
  • First release: Feb 21, 2017
  • Latest release: Mar 15, 2017
  • Number of updates: 3
  • Update frequency: every 8.3 days
  • Top authors: codepicnic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /543 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.17ms] Passed 4 tests

Analyzing server-side resources used by CodePicnic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.68 ▼32.59
Dashboard /wp-admin2.05 ▼1.265.94 ▼43.98
Posts /wp-admin/edit.php2.05 ▼1.315.56 ▼42.43
Add New Post /wp-admin/post-new.php2.05 ▼3.845.16 ▼89.67
Media Library /wp-admin/upload.php2.05 ▼1.186.56 ▼31.90

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

CodePicnic: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▲0.001.61 ▲0.0740.73 ▼0.22
Dashboard /wp-admin2,197 ▲175.63 ▲0.0084.25 ▲0.6537.36 ▼5.56
Posts /wp-admin/edit.php2,084 ▼161.98 ▼0.0334.78 ▲0.8835.26 ▼2.16
Add New Post /wp-admin/post-new.php1,538 ▲118.32 ▲0.06650.26 ▲16.7687.50 ▲21.40
Media Library /wp-admin/upload.php1,399 ▲24.23 ▲0.01100.26 ▼21.0644.91 ▼4.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the codepicnic handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/codepicnic/codepicnic.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === codepicnic === )
The official readme.txt might help

codepicnic/codepicnic.php 85% from 13 tests

The principal PHP file in "CodePicnic" v. 1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected42 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13021
PHP191217
CSS1004

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.09
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/codepicnic.png1.11KB1.25KB0.00%