84% online-succes

Code Review | Online Succes

WordPress plugin Online Succes scored84%from 54 tests.

About plugin

  • Plugin page: online-succes
  • Plugin version: 2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: May 9, 2023
  • Number of updates: 15
  • Update frequency: every 91.0 days
  • Top authors: onlinesucces (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,386 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼12.04ms] Passed 4 tests

Server-side resources used by Online Succes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0332.92 ▼7.70
Dashboard /wp-admin3.36 ▲0.0248.44 ▼11.97
Posts /wp-admin/edit.php3.41 ▲0.0649.96 ▼3.05
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.94 ▼25.42
Media Library /wp-admin/upload.php3.28 ▲0.0539.40 ▼1.39
Online Succes /wp-admin/options-general.php?page=online_succes_visitors3.2538.07

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Online Succes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11313.19 ▼1.226.04 ▲4.2844.03 ▲2.99
Dashboard /wp-admin2,213 ▲254.86 ▼1.04116.94 ▲14.7040.70 ▼0.67
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0040.55 ▼1.0535.46 ▲0.00
Add New Post /wp-admin/post-new.php1,517 ▲12517.52 ▼0.97675.03 ▲76.3553.38 ▼5.48
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0695.09 ▼16.8146.63 ▲2.69
Online Succes /wp-admin/options-general.php?page=online_succes_visitors8552.0528.7727.46

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/online-succes/os-wp-plugin.php:108

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: The official readme.txt might help

online-succes/os-wp-plugin.php 92% from 13 tests

The main PHP file in "Online Succes" ver. 2.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("online-succes.php" instead of "os-wp-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected231 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14252231

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.28
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

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