84% skyword-publishing-api

Code Review | Skyword Publishing API

WordPress plugin Skyword Publishing API scored84%from 54 tests.

About plugin

  • Plugin page: skyword-publishin...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2019
  • Latest release: Nov 2, 2023
  • Number of updates: 44
  • Update frequency: every 36.9 days
  • Top authors: skyword (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,541 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
Install script ran successfully

Server metrics [RAM: ▼0.60MB] [CPU: ▼13.54ms] Passed 4 tests

Analyzing server-side resources used by Skyword Publishing API
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0548.08 ▲9.36
Dashboard /wp-admin3.43 ▲0.1345.83 ▲0.19
Posts /wp-admin/edit.php3.48 ▲0.1249.07 ▲1.75
Add New Post /wp-admin/post-new.php3.24 ▼2.6435.28 ▼56.76
Media Library /wp-admin/upload.php3.29 ▲0.0636.64 ▲0.66
Skyword API /wp-admin/options-general.php?page=skyword_api_menu3.2631.25

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
skyword_api_plugin_options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Skyword Publishing API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲714.23 ▼0.121.71 ▼0.0543.82 ▲5.15
Dashboard /wp-admin2,202 ▲315.68 ▲0.1496.55 ▼4.8942.06 ▲0.22
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0640.67 ▼2.0636.46 ▼1.89
Add New Post /wp-admin/post-new.php1,529 ▼023.22 ▼0.32674.05 ▲65.7853.82 ▲5.27
Media Library /wp-admin/upload.php1,404 ▲44.17 ▲0.0095.50 ▼8.0442.06 ▼0.20
Skyword API /wp-admin/options-general.php?page=skyword_api_menu9662.0024.1731.96

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • skyword_api_plugin_options

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/skyword-publishing-api/php/class-skyword-publish.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/skyword-publishing-api/php/options.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Skyword_API_Publish' not found in wp-content/plugins/skyword-publishing-api/php/routes/class-skyword-version.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Skyword_API_Publish' not found in wp-content/plugins/skyword-publishing-api/php/routes/class-skyword-content-types.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/skyword-publishing-api/php/class-skyword-sitemaps.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/skyword-publishing-api/php/class-skyword-opengraph.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Skyword_API_Publish' not found in wp-content/plugins/skyword-publishing-api/php/routes/class-skyword-posts.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Skyword_API_Publish' not found in wp-content/plugins/skyword-publishing-api/php/routes/class-skyword-images.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/skyword-publishing-api/php/class-skyword-shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Skyword_API_Publish' not found in wp-content/plugins/skyword-publishing-api/php/routes/class-skyword-categories.php:9

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: api, skyword

skyword-publishing-api/skyword.php 92% from 13 tests

This is the main PHP file of "Skyword Publishing API" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("skyword-publishing-api.php" instead of "skyword.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,110 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP153864712,079
JSON10012
JavaScript10011
CSS1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.31
▷ Minimum class complexity2.00
▷ Maximum class complexity83.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods82
▷ Static methods00.00%
▷ Public methods6073.17%
▷ Protected methods1518.29%
▷ Private methods78.54%
Functions33
▷ Named functions2060.61%
▷ Anonymous functions1339.39%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin