10% activitysparks

Code Review | Activity Sparks

WordPress plugin Activity Sparks scored10%from 54 tests.

About plugin

  • Plugin page: activitysparks
  • Plugin version: 0.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2009
  • Latest release: Aug 18, 2015
  • Number of updates: 22
  • Update frequency: every 99.7 days
  • Top authors: pantsonhead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,244 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
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/activitysparks/activitysparks.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; activitysparks has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼53.51ms] Passed 4 tests

A check of server-side resources used by Activity Sparks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.11 ▼35.44
Dashboard /wp-admin2.20 ▼1.116.64 ▼47.03
Posts /wp-admin/edit.php2.20 ▼1.167.41 ▼42.62
Add New Post /wp-admin/post-new.php2.20 ▼3.696.89 ▼88.93
Media Library /wp-admin/upload.php2.20 ▼1.035.93 ▼26.88

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_activitysparks
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Activity Sparks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▲0.191.95 ▲0.2548.53 ▼2.71
Dashboard /wp-admin2,206 ▲215.90 ▲0.0197.04 ▼18.7138.93 ▼5.02
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0136.68 ▲1.1333.46 ▲2.45
Add New Post /wp-admin/post-new.php1,542 ▲718.13 ▼4.92636.26 ▼38.6957.71 ▲6.43
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0596.23 ▼5.7341.49 ▼2.87

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/activitysparks/activitysparks.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; activitysparks has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_activitysparks
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/activitysparks/activitysparks.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: widget, chart, activity, sidebar, plugin...

activitysparks/activitysparks.php Passed 13 tests

The primary PHP file in "Activity Sparks" version 0.6.1 is used by WordPress to initiate all plugin functionality
83 characters long description:
A widget to display a customizable sparkline graph of post and/or comment activity.

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
Success! There were no dangerous files found in this plugin270 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14229270

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity7.67
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin