68% lytics

Code Review | Lytics

WordPress plugin Lytics scored68%from 54 tests.

About plugin

  • Plugin page: lytics
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.2
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: May 1, 2015
  • Number of updates: 21
  • Update frequency: every 0.1 days
  • Top authors: rfair404 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /670 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.79MB] [CPU: ▼52.23ms] Passed 4 tests

This is a short check of server-side resources used by Lytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.336.08 ▼37.78
Dashboard /wp-admin2.23 ▼1.0710.73 ▼38.95
Posts /wp-admin/edit.php2.23 ▼1.128.61 ▼41.96
Add New Post /wp-admin/post-new.php2.23 ▼3.659.26 ▼90.22
Media Library /wp-admin/upload.php2.23 ▼0.9910.24 ▼26.26
Lytics /wp-admin/options-general.php?page=lytics-options2.238.27

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.17 ▼1.412.05 ▼0.0244.22 ▲0.82
Dashboard /wp-admin2,210 ▲254.80 ▼0.17108.20 ▲7.8643.26 ▲3.72
Posts /wp-admin/edit.php2,090 ▼22.06 ▲0.0534.21 ▼9.5736.96 ▼1.05
Add New Post /wp-admin/post-new.php1,536 ▲2223.26 ▲5.80667.56 ▲5.8757.08 ▼5.58
Media Library /wp-admin/upload.php1,389 ▲74.23 ▲0.02101.46 ▲1.7245.69 ▲1.95
Lytics /wp-admin/options-general.php?page=lytics-options8122.0322.3224.69

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
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/lytics/lib/lytics-addons.php+47
    in_array() expects parameter 2 to be array, bool given
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lytics-options
    • > Warning in wp-content/plugins/lytics/lib/lytics-settings.php+171
    in_array() expects parameter 2 to be array, bool given

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lytics/lib/partial-settings-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/lytics/lytics.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: analytics, lytics

lytics/lytics.php 92% from 13 tests

"Lytics" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin414 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP994305387
JavaScript12027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.71
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods44
▷ Static methods12.27%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin