79% diasposter

Code Review | Diasposter

WordPress plugin Diasposter scored79%from 54 tests.

About plugin

  • Plugin page: diasposter
  • Plugin version: 0.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Feb 19, 2015
  • Latest release: May 25, 2015
  • Number of updates: 44
  • Update frequency: every 43.5 days
  • Top authors: meitar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,405 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.84ms] Passed 4 tests

A check of server-side resources used by Diasposter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.18 ▼0.00
Dashboard /wp-admin3.33 ▲0.0351.16 ▲2.78
Posts /wp-admin/edit.php3.39 ▲0.0351.22 ▲1.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.36 ▼19.83
Media Library /wp-admin/upload.php3.26 ▲0.0339.49 ▲2.84
Diasposter /wp-admin/options-general.php?page=diasposter_settings3.2031.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Diasposter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.25 ▼0.101.69 ▲0.1145.77 ▼2.00
Dashboard /wp-admin2,201 ▲305.62 ▼0.0492.86 ▲1.3640.75 ▼2.99
Posts /wp-admin/edit.php2,106 ▲62.00 ▼0.0139.25 ▲1.9936.29 ▲2.28
Add New Post /wp-admin/post-new.php6,291 ▲4,76518.77 ▼4.47929.29 ▲229.8958.76 ▼3.60
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.02113.42 ▲7.6846.40 ▲1.17
Diasposter /wp-admin/options-general.php?page=diasposter_settings8861.9926.4634.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=diasposter_settings
    • > Notice in wp-content/plugins/diasposter/diasposter.php+1175
    Undefined index: user_accounts
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=diasposter_settings
    • > Notice in wp-content/plugins/diasposter/diasposter.php+1192
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=diasposter_settings
    • > Notice in wp-content/plugins/diasposter/diasposter.php+1192
    Undefined index: passwords

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/diasposter/diasposter.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: post formats, crosspost, post, publishing, diaspora

diasposter/diasposter.php Passed 13 tests

"Diasposter" version 0.1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
97 characters long description:
Automatically crossposts to your Diaspora* stream when you publish a post on your WordPress blog.

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected3,313 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55694522,971
PO File1108115317
CSS10025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity119.00
▷ Minimum class complexity30.00
▷ Maximum class complexity223.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods152
▷ Static methods21.32%
▷ Public methods5838.16%
▷ Protected methods3623.68%
▷ Private methods5838.16%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin