78% publisher-media-kit

Code Review | Publisher Media Kit

WordPress plugin Publisher Media Kit scored78%from 54 tests.

About plugin

  • Plugin page: publisher-media-kit
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2021
  • Latest release: Oct 25, 2023
  • Number of updates: 10
  • Update frequency: every 69.2 days
  • Top authors: 10up (90%)10upbot (20%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▲6.78ms] Passed 4 tests

Server-side resources used by Publisher Media Kit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2642.05 ▲7.52
Dashboard /wp-admin3.55 ▲0.2449.65 ▲1.08
Posts /wp-admin/edit.php3.66 ▲0.3057.18 ▲12.87
Add New Post /wp-admin/post-new.php6.16 ▲0.2799.35 ▲5.64
Media Library /wp-admin/upload.php3.47 ▲0.2450.45 ▲13.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
pmk-page
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Publisher Media Kit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.82 ▲0.196.16 ▲4.5938.19 ▼4.88
Dashboard /wp-admin2,197 ▲205.50 ▼0.1182.25 ▼4.7640.94 ▼5.18
Posts /wp-admin/edit.php2,111 ▲292.02 ▲0.0140.29 ▲3.4934.49 ▼0.22
Add New Post /wp-admin/post-new.php1,665 ▲13923.89 ▲0.13600.64 ▼77.9436.06 ▼20.78
Media Library /wp-admin/upload.php1,408 ▲84.29 ▲0.0895.20 ▼13.4841.72 ▼4.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/publisher-media-kit/includes/block-patterns/digital-ad-specs.php
    • > /wp-content/plugins/publisher-media-kit/includes/block-patterns/our-packages.php
    • > /wp-content/plugins/publisher-media-kit/includes/block-patterns/stats.php
    • > /wp-content/plugins/publisher-media-kit/includes/block-patterns/our-rates.php
    • > /wp-content/plugins/publisher-media-kit/includes/block-patterns/question-block.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/publisher-media-kit/includes/block-patterns/cover.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/publisher-media-kit/includes/blocks/block-editor/tabs/markup.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/publisher-media-kit/includes/block-patterns/audience-profiles.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/publisher-media-kit/includes/block-patterns/why-digital.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/publisher-media-kit/includes/block-patterns/cover-esperanza.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/publisher-media-kit/publisher-media-kit.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: digital ad specs, audience profiles, media kit, ad rates

publisher-media-kit/publisher-media-kit.php 92% from 13 tests

The principal PHP file in "Publisher Media Kit" v. 1.3.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,851 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP342586681,107
JavaScript1767120527
CSS5380139
JSON30076
SVG2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.80
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods44
▷ Static methods2045.45%
▷ Public methods4193.18%
▷ Protected methods00.00%
▷ Private methods36.82%
Functions30
▷ Named functions2376.67%
▷ Anonymous functions723.33%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-512.png7.26KB3.92KB▼ 46.02%
assets/images/icon-digital-1.png0.71KB0.71KB0.28%
dist/images/icon-digital-2.png0.69KB0.66KB▼ 4.23%
assets/images/icon-woman.png1.45KB1.54KB0.00%
dist/images/icon-128.png1.52KB1.52KB0.00%