77% voimada-rest-api

Code Review | PostRemote

WordPress plugin PostRemote scored77%from 54 tests.

About plugin

  • Plugin page: voimada-rest-api
  • Plugin version: 1.0.0
  • PHP compatiblity: 4.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Feb 10, 2020
  • Latest release: Feb 10, 2020
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: voimada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /484 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

A check of server-side resources used by PostRemote
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.49 ▼4.04
Dashboard /wp-admin3.33 ▲0.0253.10 ▲0.64
Posts /wp-admin/edit.php3.38 ▲0.0247.96 ▼11.57
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.24 ▼25.93
Media Library /wp-admin/upload.php3.25 ▲0.0243.66 ▲5.62

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PostRemote
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲10213.39 ▼0.698.95 ▲6.8944.11 ▼0.58
Dashboard /wp-admin2,211 ▲345.65 ▼0.0395.26 ▼10.9741.63 ▼3.41
Posts /wp-admin/edit.php2,137 ▲342.02 ▼0.0133.64 ▼9.1134.07 ▼3.18
Add New Post /wp-admin/post-new.php1,542 ▼323.14 ▲0.29653.70 ▼8.7868.88 ▲13.45
Media Library /wp-admin/upload.php1,416 ▲134.25 ▲0.12109.07 ▼3.6346.95 ▼0.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • category_children
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/voimada-rest-api/public/partials/voimadarestapi-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/voimada-rest-api/admin/partials/voimadarestapi-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Post Remote API Endpoint. API Key to be copied. https://www.dropbox.com/s/x5aaxbv4b4vg3m6/screenshot12020-01-24at10.42.38.jpeg?dl=0), #2 (Voimada API key destination. Paste API key here. https://www.dropbox.com/s/mjp6roty4k3gwy8/screenshot2.png?dl=0)
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
You can take inspiration from this readme.txt

voimada-rest-api/voimadarestapi.php 77% from 13 tests

The main PHP script in "PostRemote" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 194 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("voimada-rest-api.php" instead of "voimadarestapi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected637 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13184558630
JavaScript24546
Markdown1001
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.38
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.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