94% p2-check-in

Code Review | P2 Check In

WordPress plugin P2 Check In scored 94% from 54 tests.

About plugin

  • Plugin page: p2-check-in
  • Plugin version: 0.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 5.8.1
  • First release: Jun 25, 2012
  • Latest release: Jul 5, 2012
  • Number of updates: 10
  • Update frequency: every 1.0 days
  • Top authors: ryanimel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,451 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼145.08ms] Passed 4 tests

Server-side resources used by P2 Check In
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1346.80 ▲24.09
Dashboard /wp-admin3.07 ▲0.0247.03 ▼9.22
Posts /wp-admin/edit.php3.12 ▲0.0250.23 ▲2.71
Add New Post /wp-admin/post-new.php5.43 ▼0.0089.73 ▼570.95
Media Library /wp-admin/upload.php3.02 ▲0.0134.41 ▼2.86

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by P2 Check In
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,705 ▲10915.81 ▼0.0911.75 ▲3.7646.74 ▼5.75
Dashboard /wp-admin2,970 ▲335.99 ▲0.01142.61 ▼28.97114.31 ▼5.35
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0168.67 ▼2.8496.92 ▲9.25
Add New Post /wp-admin/post-new.php1,683 ▼018.74 ▲0.00379.24 ▼36.91114.47 ▲3.42
Media Library /wp-admin/upload.php1,810 ▲35.02 ▼0.00148.48 ▼1.93127.93 ▼197.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/p2-check-in/p2-check-in.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (The "Log In" button that displays before you've signed into the site.), #2 (The "I'm here!" button that will check you in. Also notice the recently checked out user faded out in the sidebar.), #3 (Once you are checked in the "I'm leaving!" button displays and will check you out.)
The official readme.txt is a good inspiration

p2-check-in/p2-check-in.php 92% from 13 tests

This is the main PHP file of "P2 Check In" version 0.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 277 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin310 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP111051156
CSS1184110
PO File1141544

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.50KB7.55KB▼ 59.20%
screenshot-2.png17.28KB6.69KB▼ 61.29%
screenshot-3.png22.56KB7.93KB▼ 64.84%