10% mediavine-pagination

Code Review | Mediavine Pagination

WordPress plugin Mediavine Pagination scored10%from 54 tests.

About plugin

  • Plugin page: mediavine-pagination
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2016
  • Latest release: Oct 21, 2016
  • Number of updates: 2
  • Update frequency: every 5.0 days
  • Top authors: mediavine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,404 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Mediavine_Pagination' does not have a method 'activate'

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.86ms] Passed 4 tests

A check of server-side resources used by Mediavine Pagination
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0749.43 ▲8.93
Dashboard /wp-admin3.41 ▲0.1148.63 ▼0.27
Posts /wp-admin/edit.php3.52 ▲0.1748.26 ▼1.49
Add New Post /wp-admin/post-new.php5.99 ▲0.1096.09 ▼5.63
Media Library /wp-admin/upload.php3.33 ▲0.1037.17 ▼0.06

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
mediavinePagSetting_teaser_font_style
mediavinePagSetting_teaser_text
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mediavine Pagination
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.35 ▼0.011.78 ▲0.0246.63 ▲3.68
Dashboard /wp-admin2,201 ▲245.54 ▼0.1490.54 ▲0.9340.10 ▼4.00
Posts /wp-admin/edit.php2,104 ▲11.97 ▼0.0639.43 ▼0.5737.35 ▼0.07
Add New Post /wp-admin/post-new.php1,533 ▲723.25 ▲0.22676.95 ▼2.3855.92 ▲0.35
Media Library /wp-admin/upload.php1,404 ▲14.27 ▲0.11105.99 ▲4.2147.84 ▲3.62
Mediavine Pagination /wp-admin/options-general.php?page=mediavine_pagination_pagination_settings6891.516.8021.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Mediavine_Pagination' does not have a method 'deactivate'
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • mediavinePagSetting_teaser_text
    • mediavinePagSetting_teaser_font_style
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mediavine-pagination/views/settings.php:2
    • > PHP Notice
      Undefined variable: styles in wp-content/plugins/mediavine-pagination/views/page-nav-style.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mediavine-pagination/views/page-nav-style.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mediavine-pagination/ui/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mediavine-pagination/views/page-nav-style.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mediavine-pagination/mediavine-pagination.php:439

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === mediavine-pagination === )
You can take inspiration from this readme.txt

mediavine-pagination/mediavine-pagination.php Passed 13 tests

The main file in "Mediavine Pagination" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
45 characters long description:
Allows for easy styling of pagination blocks.

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
No dangerous file extensions were detected1,630 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript910150597
PHP587113509
HTML6230389
CSS3310135

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.50
▷ Minimum class complexity5.00
▷ Maximum class complexity30.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods414.81%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
PNG images were not found in this plugin