78% publir-ump

Code Review | Publir - Unified Monetization Platform

WordPress plugin Publir - Unified Monetization Platform scored78%from 54 tests.

About plugin

  • Plugin page: publir-ump
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 27, 2021
  • Latest release: Jun 9, 2023
  • Number of updates: 18
  • Update frequency: every 32.8 days
  • Top authors: publirump (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Publir - Unified Monetization Platform
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.04 ▼0.4220.33 ▼20.07
Dashboard /wp-admin3.47 ▲0.1743.40 ▼5.02
Posts /wp-admin/edit.php3.48 ▲0.1238.36 ▼8.00
Add New Post /wp-admin/post-new.php6.00 ▲0.1179.50 ▼8.17
Media Library /wp-admin/upload.php3.44 ▲0.2238.58 ▲2.99
Background /wp-admin/themes.php?page=3.2125.44

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Publir - Unified Monetization Platform: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,408 ▼3383.47 ▼11.170.92 ▼0.816.95 ▼33.94
Dashboard /wp-admin1,977 ▼1971.62 ▼4.2415.50 ▼95.9935.72 ▼14.10
Posts /wp-admin/edit.php1,996 ▼961.58 ▼0.437.64 ▼32.7132.17 ▼6.38
Add New Post /wp-admin/post-new.php963 ▼5702.05 ▼20.9922.33 ▼600.455.32 ▼56.84
Media Library /wp-admin/upload.php922 ▼4692.04 ▼2.1725.10 ▼72.9127.39 ▼13.43
Background /wp-admin/themes.php?page=280.440.113.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/publir-ump/functions.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/publir-ump/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/publir-ump/ump-page-template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/publir-ump/options.php:216
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/publir-ump/ump.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/themes.php?page=
    • > Network (severe)
    wp-admin/themes.php?page= - Failed to load resource: the server responded with a status of 403 (Forbidden)

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 require attention:
  • Requires at least: Invalid version format
The official readme.txt might help

publir-ump/ump.php 92% from 13 tests

"Publir - Unified Monetization Platform" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("publir-ump.php" instead of "ump.php")

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 detected2,702 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP51371581,420
JavaScript213133866
CSS12413416

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions32
▷ Named functions3196.88%
▷ Anonymous functions13.12%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin