10% wpcheckin

Code Review | WPCheckin Widget and Shortcode

WordPress plugin WPCheckin Widget and Shortcode scored10%from 54 tests.

About plugin

  • Plugin page: wpcheckin
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Nov 24, 2013
  • Latest release: Nov 26, 2013
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: asommer70 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /734 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wpcheckin/wpcheckin.php+333
    Methods with the same name as their class will not be constructors in a future version of PHP; WPCheckin_Widget has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼54.03ms] Passed 4 tests

Server-side resources used by WPCheckin Widget and Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.324.55 ▼33.88
Dashboard /wp-admin2.17 ▼1.147.27 ▼45.44
Posts /wp-admin/edit.php2.17 ▼1.196.24 ▼40.19
Add New Post /wp-admin/post-new.php2.17 ▼3.726.83 ▼96.61
Media Library /wp-admin/upload.php2.17 ▼1.067.76 ▼28.01
Checkins /wp-admin/edit.php?post_type=wpcheckin2.176.61
Checkin /wp-admin/options-general.php?page=wpcheckin2.176.37
Add New /wp-admin/post-new.php?post_type=wpcheckin2.176.01

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_wpcheckin_widget
wpcheckin

Browser metrics Passed 4 tests

An overview of browser requirements for WPCheckin Widget and Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.56 ▼1.055.16 ▲3.5836.29 ▼5.01
Dashboard /wp-admin2,238 ▲535.84 ▲0.9594.07 ▼9.3739.03 ▼2.03
Posts /wp-admin/edit.php2,124 ▲352.03 ▲0.0233.87 ▼4.1733.87 ▼1.10
Add New Post /wp-admin/post-new.php1,553 ▲2518.05 ▼5.24676.97 ▲70.0258.53 ▲9.68
Media Library /wp-admin/upload.php1,417 ▲264.20 ▼0.0097.32 ▲1.0045.54 ▲3.84
Checkins /wp-admin/edit.php?post_type=wpcheckin1,0881.9334.9029.80
Checkin /wp-admin/options-general.php?page=wpcheckin9002.2027.7424.34
Add New /wp-admin/post-new.php?post_type=wpcheckin2,2127.75164.1472.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wpcheckin/wpcheckin.php+333
    Methods with the same name as their class will not be constructors in a future version of PHP; WPCheckin_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wpcheckin_widget
    • can_compress_scripts
    • widget_recent-comments
    • wpcheckin
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpcheckin
    • > Deprecated in wp-content/plugins/wpcheckin/wpcheckin.php+333
    Methods with the same name as their class will not be constructors in a future version of PHP; WPCheckin_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wpcheckin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP 0% 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 items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpcheckin/single-wpcheckin.php
    • > /wp-content/plugins/wpcheckin/inc/options-page-wrapper.php
    • > /wp-content/plugins/wpcheckin/inc/places-list.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpcheckin/wpcheckin.php on line 14
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/wpcheckin/inc/places-list.php on line 2
    • > PHP Notice
      Undefined variable: after_title in wp-content/plugins/wpcheckin/inc/front-end.php on line 4
    • > PHP Notice
      Undefined variable: wpcheckin_key in wp-content/plugins/wpcheckin/inc/options-page-wrapper.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/wpcheckin/inc/front-end.php:7
    • > PHP Notice
      Undefined variable: wpcheckin_places in wp-content/plugins/wpcheckin/inc/places-list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpcheckin/wpcheckin.php:28
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/wpcheckin/inc/front-end.php on line 4
    • > PHP Notice
      Trying to get property 'status' of non-object in wp-content/plugins/wpcheckin/inc/places-list.php on line 1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wpcheckin/inc/widget-fields.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: location, widget, google places, api, shortcode...

wpcheckin/wpcheckin.php Passed 13 tests

The main file in "WPCheckin Widget and Shortcode" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
37 characters long description:
Add geo checkin feature to WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected600 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP614269421
JavaScript218869
CSS19060
Markdown129050

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
There are no PNG files in this plugin