10% wp-publisher

Code Review | WP Publisher

WordPress plugin WP Publisher scored10%from 54 tests.

About plugin

  • Plugin page: wp-publisher
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 23, 2014
  • Latest release: Jun 23, 2014
  • Number of updates: 8
  • Update frequency: every 2.4 days
  • Top authors: Yuichiro ABE (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,035 total downloads

Benchmarks

Plugin footprint 58% 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
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-publisher/ftp-class.php+98
    Methods with the same name as their class will not be constructors in a future version of PHP; ftp has a deprecated constructor

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.78ms] Passed 4 tests

This is a short check of server-side resources used by WP Publisher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.55 ▼9.87
Dashboard /wp-admin3.32 ▼0.0347.95 ▼18.68
Posts /wp-admin/edit.php3.37 ▲0.0147.41 ▼2.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.93 ▼7.74
Media Library /wp-admin/upload.php3.24 ▲0.0140.42 ▲4.26
WP Publisher /wp-admin/options-general.php?page=wp-publisher-options3.1832.63

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
wp_publisher_outlandish_sync_secret
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Publisher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.20 ▼1.101.54 ▼0.0640.39 ▼3.62
Dashboard /wp-admin2,228 ▲214.91 ▼0.03104.09 ▼2.8639.27 ▼4.03
Posts /wp-admin/edit.php2,104 ▲42.04 ▼0.0137.25 ▼2.0535.45 ▲0.70
Add New Post /wp-admin/post-new.php1,551 ▲2523.37 ▲5.81681.29 ▲53.6946.86 ▼9.07
Media Library /wp-admin/upload.php1,410 ▲74.18 ▼0.04111.78 ▲10.0149.23 ▲3.93
WP Publisher /wp-admin/options-general.php?page=wp-publisher-options9822.0726.0832.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • wp_publisher_outlandish_sync_secret
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp-publisher-options
    • > Warning in wp-content/plugins/wp-publisher/wp-publisher-admin.php+19
    session_start(): Cannot start session when headers already sent
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-publisher-options
    • > Notice in wp-content/plugins/wp-publisher/wp-publisher-admin.php+25
    Undefined variable: _SESSION
    • > GET request to /wp-admin/options-general.php?page=wp-publisher-options
    • > Notice in wp-content/plugins/wp-publisher/wp-publisher-admin.php+51
    Undefined variable: html
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-publisher-options
    • > Notice in wp-content/plugins/wp-publisher/wp-publisher-admin.php+98
    Undefined variable: wp_publisher_port

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-publisher/wp-publisher.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

wp-publisher/wp-publisher.php Passed 13 tests

The main PHP script in "WP Publisher" version 0.1.1 is automatically included on every request by WordPress
36 characters long description:
sync two WordPress site by one click

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 detected1,335 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33203141,243
PO File1313392

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity97.00
▷ Minimum class complexity61.00
▷ Maximum class complexity133.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods58
▷ Static methods00.00%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin