79% paste-analytics

Code Review | Paste Analytics

WordPress plugin Paste Analytics scored79%from 54 tests.

About plugin

  • Plugin page: paste-analytics
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 25, 2014
  • Latest release: Oct 26, 2014
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: Jenst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,102 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Paste Analytics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0728.84 ▼14.54
Dashboard /wp-admin3.32 ▲0.0245.10 ▼0.05
Posts /wp-admin/edit.php3.37 ▲0.0144.26 ▼3.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.52 ▼2.49
Media Library /wp-admin/upload.php3.24 ▲0.0134.94 ▲1.24
Paste Analytics /wp-admin/options-general.php?page=pasteanalytics3.1830.24

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paste Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.44 ▲0.131.85 ▼0.0742.83 ▼2.83
Dashboard /wp-admin2,210 ▲185.81 ▲0.9198.86 ▼19.9937.84 ▼5.19
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0439.48 ▼1.5535.21 ▼5.09
Add New Post /wp-admin/post-new.php1,538 ▲422.94 ▼0.34611.07 ▼65.5654.04 ▼3.64
Media Library /wp-admin/upload.php1,395 ▲104.19 ▲0.0196.28 ▼4.9542.98 ▲0.72
Paste Analytics /wp-admin/options-general.php?page=pasteanalytics8122.0528.0541.89

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pasteanalytics
    • > Notice in wp-content/plugins/paste-analytics/paste-analytics.php+97
    Trying to access array offset on value of type bool

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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paste-analytics/paste-analytics.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
7 plugin tags: statistics, ga, google, analytics, stats...

paste-analytics/paste-analytics.php Passed 13 tests

The primary PHP file in "Paste Analytics" version 1.1 is used by WordPress to initiate all plugin functionality
40 characters long description:
Add Google Analytics script on your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected103 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1149103

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin