10% ideapress-json-api

Code Review | IdeaPress - Turn WordPress into Mobile Apps (Android, iPhone, WinPhone)

WordPress plugin IdeaPress - Turn WordPress into Mobile Apps (Android, iPhone, WinPhone) scored10%from 54 tests.

About plugin

  • Plugin page: ideapress-json-api
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.4
  • WordPress version: 6.3.1
  • First release: May 31, 2013
  • Latest release: Feb 7, 2014
  • Number of updates: 11
  • Update frequency: every 23.5 days
  • Top authors: michaelsiu (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /18,437 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
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/post.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Post has a deprecated constructor

Server metrics [RAM: ▼1.73MB] [CPU: ▼56.79ms] Passed 4 tests

This is a short check of server-side resources used by IdeaPress - Turn WordPress into Mobile Apps (Android, iPhone, WinPhone)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.195.93 ▼35.39
Dashboard /wp-admin2.29 ▼1.067.70 ▼54.10
Posts /wp-admin/edit.php2.29 ▼1.079.00 ▼38.34
Add New Post /wp-admin/post-new.php2.29 ▼3.606.57 ▼99.34
Media Library /wp-admin/upload.php2.29 ▼0.947.79 ▼22.50
IDEAPRESS JSON API /wp-admin/options-general.php?page=json-api2.296.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

IdeaPress - Turn WordPress into Mobile Apps (Android, iPhone, WinPhone): an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.32 ▼0.251.72 ▼0.1042.24 ▼6.65
Dashboard /wp-admin2,199 ▲195.57 ▼0.1094.47 ▼4.8045.07 ▲0.19
Posts /wp-admin/edit.php2,104 ▲11.95 ▼0.0835.94 ▼9.0031.70 ▼4.75
Add New Post /wp-admin/post-new.php1,537 ▲818.22 ▼5.10630.32 ▼4.4677.41 ▲21.10
Media Library /wp-admin/upload.php1,401 ▲44.17 ▲0.01105.27 ▲2.0045.39 ▲4.66
IDEAPRESS JSON API /wp-admin/options-general.php?page=json-api1,0782.0025.7532.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/post.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Post has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=json-api
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/post.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Post has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=json-api
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/comment.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Comment has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=json-api
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/category.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Category has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=json-api
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/tag.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Tag has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=json-api
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/author.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Author has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=json-api
    • > Deprecated in wp-content/plugins/ideapress-json-api/models/attachment.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Attachment has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=json-api
    • > Notice in wp-content/plugins/ideapress-json-api/singletons/api.php+174
    Undefined index: url

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ideapress-json-api/ideapress-json-api.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
Please take inspiration from this readme.txt

ideapress-json-api/ideapress-json-api.php Passed 13 tests

The main PHP script in "IdeaPress - Turn WordPress into Mobile Apps (Android, iPhone, WinPhone)" version 1.0.0 is automatically included on every request by WordPress
71 characters long description:
A RESTful API used by IdeaPress Multi-screen applications for WordPress

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
Success! There were no dangerous files found in this plugin2,496 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP374023762,496

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity27.47
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods124
▷ Static methods00.00%
▷ Public methods11794.35%
▷ Protected methods75.65%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.90KB8.29KB▼ 63.82%