10% swiftypress

Code Review | SwiftyPress

WordPress plugin SwiftyPress scored10%from 54 tests.

About plugin

  • Plugin page: swiftypress
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2018
  • Latest release: May 24, 2019
  • Number of updates: 41
  • Update frequency: every 8.7 days
  • Top authors: zamzaminc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,489 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/swiftypress/SwiftyPress_Plugin.php+40
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼0.41MB] [CPU: ▼15.29ms] Passed 4 tests

Analyzing server-side resources used by SwiftyPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3239.54 ▲0.62
Dashboard /wp-admin3.62 ▲0.2749.43 ▼10.88
Posts /wp-admin/edit.php3.67 ▲0.3149.38 ▲4.11
Add New Post /wp-admin/post-new.php3.43 ▼2.4637.75 ▼54.99
Media Library /wp-admin/upload.php3.48 ▲0.2539.44 ▲5.71

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
SwiftyPress_Plugin_iOSID
SwiftyPress_Plugin__installed
db_upgraded
SwiftyPress_Plugin_AndroidID
theysaidso_admin_options
SwiftyPress_Plugin__version
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for SwiftyPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲2214.28 ▼0.271.80 ▼0.2540.30 ▲2.68
Dashboard /wp-admin2,214 ▲375.64 ▲0.0686.50 ▼6.3436.22 ▼9.89
Posts /wp-admin/edit.php2,116 ▲161.97 ▼0.0536.56 ▼1.2930.01 ▼6.86
Add New Post /wp-admin/post-new.php1,550 ▲2418.27 ▼4.74613.10 ▼3.4391.25 ▲34.91
Media Library /wp-admin/upload.php1,419 ▲194.16 ▲0.0798.06 ▼4.6641.02 ▼3.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • SwiftyPress_Plugin_iOSID
    • SwiftyPress_Plugin__installed
    • SwiftyPress_Plugin_AndroidID
    • widget_recent-posts
    • widget_recent-comments
    • SwiftyPress_Plugin__version
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/swiftypress/theme/page-mobile-comments.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: postid in wp-content/plugins/swiftypress/theme/page-mobile-comments.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftyPress_REST_V3' not found in wp-content/plugins/swiftypress/SwiftyPress_REST_V3_Posts_Controller.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/swiftypress/swiftypress.php:78
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftyPress_REST_V5' not found in wp-content/plugins/swiftypress/SwiftyPress_REST_V5_Modified_Controller.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftyPress_REST_V5' not found in wp-content/plugins/swiftypress/SwiftyPress_REST_V5_Media_Controller.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftyPress_REST_V3' not found in wp-content/plugins/swiftypress/SwiftyPress_REST_V3_Payloads_Controller.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftyPress_REST_V5' not found in wp-content/plugins/swiftypress/SwiftyPress_REST_V5_Post_Controller.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftyPress_REST_V5' not found in wp-content/plugins/swiftypress/SwiftyPress_REST_V5_Author_Controller.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

swiftypress/swiftypress.php Passed 13 tests

Analyzing the main PHP file in "SwiftyPress" version 1.5.9
45 characters long description:
Mobile app framework for 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
There were no executable files found in this plugin1,799 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP184466941,789
JavaScript11010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods118
▷ Static methods00.00%
▷ Public methods8975.42%
▷ Protected methods2924.58%
▷ Private methods00.00%
Functions16
▷ Named functions425.00%
▷ Anonymous functions1275.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin