62% mediavine-create

Code Review | Create by Mediavine

WordPress plugin Create by Mediavine scored62%from 54 tests.

About plugin

  • Plugin page: mediavine-create
  • Plugin version: 1.9.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9.0
  • WordPress version: 6.3.1
  • First release: Sep 26, 2018
  • Latest release: Jan 12, 2023
  • Number of updates: 117
  • Update frequency: every 14.5 days
  • Top authors: mediavine (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

8,000+ active /179,505 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.91MB] [CPU: ▼8.62ms] Passed 4 tests

Analyzing server-side resources used by Create by Mediavine
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.35 ▲0.8946.07 ▲10.06
Dashboard /wp-admin4.20 ▲0.8640.88 ▼13.51
Posts /wp-admin/edit.php4.28 ▲0.9246.09 ▼0.39
Add New Post /wp-admin/post-new.php6.85 ▲0.9680.65 ▼22.59
Media Library /wp-admin/upload.php4.21 ▲0.9837.73 ▲2.02
Add New Create Card /wp-admin/post-new.php?post_type=mv_create4.3250.71
User Reviews /wp-admin/edit.php?post_type=mv_create&page=reviews4.2141.12
Recipes /wp-admin/edit.php?post_type=mv_create&page=recipe4.2147.34
Recommended Products /wp-admin/edit.php?post_type=mv_create&page=products4.2138.05
All Create Cards /wp-admin/edit.php?post_type=mv_create4.2839.39
Settings /wp-admin/edit.php?post_type=mv_create&page=settings4.2139.79
Lists /wp-admin/edit.php?post_type=mv_create&page=list4.2138.19
Create by Mediavine /wp-admin/options-general.php?page=mv_settings4.2137.80
How-Tos /wp-admin/edit.php?post_type=mv_create&page=diy4.2139.30

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 606 new files
Database: 11 new tables, 19 new options
New tables
wp_mv_products_map
wp_mv_relations
wp_mv_supplies
wp_mv_revisions
wp_mv_images
wp_mv_creations
wp_mv_products
wp_mv_reviews
wp_mv_nutrition
wp_mv_shapes
...
New WordPress options
mv_settings_db_version
mv_nutrition_db_version
mv_create_version
widget_recent-posts
theysaidso_admin_options
mv_relations_db_version
widget_theysaidso_widget
mv_revisions_db_version
mv_images_db_version
mv_supplies_db_version
...

Browser metrics Passed 4 tests

An overview of browser requirements for Create by Mediavine
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13118.03 ▲3.671.48 ▲0.0339.55 ▲2.38
Dashboard /wp-admin2,283 ▲1089.27 ▲3.63195.24 ▲89.6939.19 ▲2.38
Posts /wp-admin/edit.php2,202 ▲1025.69 ▲3.6860.24 ▲21.4729.75 ▼6.39
Add New Post /wp-admin/post-new.php1,591 ▲6126.45 ▲3.26692.11 ▲85.9939.85 ▼14.71
Media Library /wp-admin/upload.php1,495 ▲1017.72 ▲3.46118.92 ▲21.6841.89 ▲0.38
Add New Create Card /wp-admin/post-new.php?post_type=mv_create1,8268.33103.8448.56
User Reviews /wp-admin/edit.php?post_type=mv_create&page=reviews1,2448.4079.0240.62
Recipes /wp-admin/edit.php?post_type=mv_create&page=recipe1,1788.5182.3738.19
Recommended Products /wp-admin/edit.php?post_type=mv_create&page=products1,1307.8477.6532.60
All Create Cards /wp-admin/edit.php?post_type=mv_create1,5288.9182.4433.13
Settings /wp-admin/edit.php?post_type=mv_create&page=settings1,4518.64111.1050.06
Lists /wp-admin/edit.php?post_type=mv_create&page=list1,1758.3876.6333.78
Create by Mediavine /wp-admin/options-general.php?page=mv_settings1,4538.78105.5040.71
How-Tos /wp-admin/edit.php?post_type=mv_create&page=diy1,1758.5679.2134.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables were found after uninstall: 11 tables
    • wp_mv_supplies
    • wp_mv_relations
    • wp_mv_settings
    • wp_mv_reviews
    • wp_mv_products_map
    • wp_mv_images
    • wp_mv_revisions
    • wp_mv_products
    • wp_mv_shapes
    • wp_mv_nutrition
    • ...
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • mv_revisions_db_version
    • mv_create_db_version
    • mv_shapes_db_version
    • mv_nutrition_db_version
    • widget_theysaidso_widget
    • db_upgraded
    • mv_reviews_db_version
    • mv_create_version
    • mv_supplies_db_version
    • theysaidso_admin_options
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mv_create&page=diy
    • > User deprecated in wp-includes/functions.php+5737
    Function WP_User_Query was called with an argument that is deprecated since version 5.9.0! who is deprecated. Use capability instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 9× PHP files output text when accessed directly:
    • > /wp-content/plugins/mediavine-create/vendor/mediavine/wordpress-router/src/class-app.php
    • > /wp-content/plugins/mediavine-create/lib/views/v1/shortcode-mv-create-social-icon-pinterest.php
    • > /wp-content/plugins/mediavine-create/lib/views/v1/shortcode-mv-create-footer.php
    • > /wp-content/plugins/mediavine-create/lib/views/v1/shortcode-mv-create-social-icon-facebook.php
    • > /wp-content/plugins/mediavine-create/lib/relations/class-relations-api.php
    • > /wp-content/plugins/mediavine-create/lib/views/v1/shortcode-mv-create-social-icon-instagram.php
    • > /wp-content/plugins/mediavine-create/mediavine-create.php
    • > /wp-content/plugins/mediavine-create/lib/feature-flags.php
    • > /wp-content/plugins/mediavine-create/lib/supplies/class-supplies-api.php
  • 245× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mediavine\\Create\\Creations_Views' not found in wp-content/plugins/mediavine-create/lib/views/v1/shortcode-mv-create-times.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Mediavine\\Create\\Amazon\\ProductAdvertisingAPI\\v1\\com\\amazon\\paapi5\\v1\\ModelInterface' not found in wp-content/plugins/mediavine-create/scoped-vendor/mediavine/paapi5-php-sdk/src/com/amazon/paapi5/v1/BrowseNode.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Mediavine\\Create\\Amazon\\ProductAdvertisingAPI\\v1\\com\\amazon\\paapi5\\v1\\ModelInterface' not found in wp-content/plugins/mediavine-create/scoped-vendor/mediavine/paapi5-php-sdk/src/com/amazon/paapi5/v1/LanguageType.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Mediavine\\Create\\Amazon\\ProductAdvertisingAPI\\v1\\com\\amazon\\paapi5\\v1\\ModelInterface' not found in wp-content/plugins/mediavine-create/scoped-vendor/mediavine/paapi5-php-sdk/src/com/amazon/paapi5/v1/GetItemsRequest.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Mediavine\\Create\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/mediavine-create/scoped-vendor/guzzlehttp/promises/src/RejectedPromise.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mediavine-create/lib/views/v1/shortcode-mv-create-video.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Mediavine\\Create\\GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/mediavine-create/scoped-vendor/guzzlehttp/promises/src/CancellationException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Mediavine\\Create\\Amazon\\ProductAdvertisingAPI\\v1\\com\\amazon\\paapi5\\v1\\ModelInterface' not found in wp-content/plugins/mediavine-create/scoped-vendor/mediavine/paapi5-php-sdk/src/com/amazon/paapi5/v1/OfferProgramEligibility.php:28
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mediavine-create/lib/views/v1/big-image/shortcode-mv-create-title.php on line 4
    • > PHP Fatal error
      Uncaught Error: Interface 'Mediavine\\Create\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/mediavine-create/scoped-vendor/guzzlehttp/psr7/src/NoSeekStream.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: seo, schema, create, recipe, how to...

mediavine-create/mediavine-create.php 92% from 13 tests

The main PHP script in "Create by Mediavine" version 1.9.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin65,879 lines of code in 459 files:
LanguageFilesBlank linesComment linesLines of code
PHP4026,30029,99462,025
Markdown121,05802,228
JSON8801,359
XML32417110
CSS1014165
JavaScript2181958
HTML20017
YAML17017

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.84
▷ Minimum class complexity1.00
▷ Maximum class complexity226.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces30
Interfaces19
Traits2
Classes298
▷ Abstract classes72.35%
▷ Concrete classes29197.65%
▷ Final classes248.25%
Methods3,769
▷ Static methods87723.27%
▷ Public methods3,39490.05%
▷ Protected methods1804.78%
▷ Private methods1955.17%
Functions373
▷ Named functions12232.71%
▷ Anonymous functions25167.29%
Constants443
▷ Global constants4510.16%
▷ Class constants39889.84%
▷ Public constants39799.75%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 compressed PNG files occupy 0.50MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
client/build/assets/icons/favicon-32x32.png1.45KB1.44KB▼ 0.54%
admin/img/card-style-default.png71.46KB72.90KB0.00%
client/build/assets/icons/favicon-16x16.png0.61KB0.72KB0.00%
admin/img/card-style-centered.png70.62KB71.56KB0.00%
client/build/assets/icons/mstile-150x150.png8.84KB5.01KB▼ 43.30%