10% contributors-posts

Code Review | Contributors' Posts

WordPress plugin Contributors' Posts scored 10% from 54 tests.

About plugin

  • Plugin page: contributors-posts
  • Plugin version: 0.8.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 30, 2013
  • Latest release: May 1, 2014
  • Number of updates: 28
  • Update frequency: every 14.2 days
  • Top authors: Magicianred (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,806 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
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/contributors-posts/includes/widget_include.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; mgr_cp_ContributorsListWidget has a deprecated constructor

Server metrics [RAM: ▼1.66MB] [CPU: ▼51.28ms] Passed 4 tests

Server-side resources used by Contributors' Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.33 ▼1.136.77 ▼34.33
Dashboard /wp-admin2.35 ▼0.967.54 ▼41.80
Posts /wp-admin/edit.php2.35 ▼1.017.27 ▼38.22
Add New Post /wp-admin/post-new.php2.35 ▼3.546.97 ▼90.75
Media Library /wp-admin/upload.php2.35 ▼0.887.02 ▼30.41
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=contributorpost2.357.59
All Contributors Posts /wp-admin/edit.php?post_type=contributorpost2.356.74
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=contributorpost2.356.60
Add New /wp-admin/post-new.php?post_type=contributorpost2.358.07
Contributors Posts Settings /wp-admin/options-general.php?page=mgr_cp_contributorsposts2.359.44
Contributors /wp-admin/edit-tags.php?taxonomy=contributor&post_type=contributorpost2.357.78

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
category_children
widget_mgr_cp_contributorsinfowidget
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_mgr_cp_randcontributorsinfowidget
db_upgraded
can_compress_scripts
widget_mgr_cp_contributorslistwidget

Browser metrics Passed 4 tests

An overview of browser requirements for Contributors' Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲14013.25 ▼1.482.06 ▲0.2442.28 ▼0.16
Dashboard /wp-admin2,251 ▲635.86 ▲1.00105.40 ▼2.6240.57 ▼3.85
Posts /wp-admin/edit.php2,134 ▲662.00 ▼0.0237.69 ▼1.4930.99 ▼4.14
Add New Post /wp-admin/post-new.php1,565 ▲4523.02 ▼0.31602.31 ▼34.0873.57 ▲14.53
Media Library /wp-admin/upload.php1,436 ▲484.19 ▼0.19100.78 ▼5.8840.86 ▼1.37
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=contributorpost1,3492.1328.8628.12
All Contributors Posts /wp-admin/edit.php?post_type=contributorpost1,2152.0033.2831.03
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=contributorpost1,4852.1530.5032.90
Add New /wp-admin/post-new.php?post_type=contributorpost2,8688.06204.8379.88
Contributors Posts Settings /wp-admin/options-general.php?page=mgr_cp_contributorsposts1,1792.0229.0236.75
Contributors /wp-admin/edit-tags.php?taxonomy=contributor&post_type=contributorpost1,2822.1435.9231.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/contributors-posts/includes/widget_include.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; mgr_cp_ContributorsListWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_theysaidso_widget
    • widget_mgr_cp_randcontributorsinfowidget
    • can_compress_scripts
    • widget_mgr_cp_contributorslistwidget
    • category_children
    • widget_mgr_cp_contributorsinfowidget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=contributor&post_type=contributorpost
    • > Deprecated in wp-content/plugins/contributors-posts/includes/widget_include.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; mgr_cp_ContributorsListWidget has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=contributor&post_type=contributorpost
    • > Deprecated in wp-content/plugins/contributors-posts/includes/widget_include.php+115
    Methods with the same name as their class will not be constructors in a future version of PHP; mgr_cp_ContributorsInfoWidget has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=contributor&post_type=contributorpost
    • > Deprecated in wp-content/plugins/contributors-posts/includes/widget_include.php+217
    Methods with the same name as their class will not be constructors in a future version of PHP; mgr_cp_RandContributorsInfoWidget has a deprecated constructor
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=contributor&post_type=contributorpost
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mgr_cp_contributorsposts
    • > Notice in wp-content/plugins/contributors-posts/includes/admin_include.php+239
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=mgr_cp_contributorsposts
    • > User deprecated in wp-includes/functions.php+5643
    File rss.php is deprecated since version 3.0.0! Use wp-includes/class-simplepie.php instead.

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
The following issues need your attention
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/contributors-posts/single-contributorpost.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/contributors-posts/includes/shortcode_include.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contributors-posts/includes/widget_include.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contributors-posts/includes/admin_include.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/contributors-posts/archive-contributorpost.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contributors-posts/includes/setup_include.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contributors-posts/includes/utility_include.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contributors-posts/includes/setup_include.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

contributors-posts/mgr_cp_contributorsposts.php 92% from 13 tests

Analyzing the main PHP file in "Contributors' Posts" version 0.8.1
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("contributors-posts.php" instead of "mgr_cp_contributorsposts.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
No dangerous file extensions were detected1,955 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP82281681,353
PO File2184203534
CSS23068

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity31.00
▷ Minimum class complexity30.00
▷ Maximum class complexity33.00
Average method complexity8.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.76MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-14.png57.04KB23.55KB▼ 58.71%
screenshot-5.png15.72KB7.14KB▼ 54.62%
screenshot-9.png121.90KB42.06KB▼ 65.50%
screenshot-15.png13.37KB6.88KB▼ 48.51%
screenshot-1.png29.67KB13.62KB▼ 54.10%