84% osa-content

Code Review | OSA Content

WordPress plugin OSA Content scored 84% from 54 tests.

About plugin

  • Plugin page: osa-content
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jul 22, 2020
  • Latest release: Jul 22, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: osacas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 143 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.38MB] [CPU: ▼126.24ms] Passed 4 tests

An overview of server-side resources used by OSA Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.16 ▲0.4445.54 ▲24.11
Dashboard /wp-admin3.47 ▲0.4160.86 ▲22.20
Posts /wp-admin/edit.php3.52 ▲0.4260.56 ▲16.12
Add New Post /wp-admin/post-new.php5.77 ▲0.34103.32 ▼544.63
Media Library /wp-admin/upload.php3.35 ▲0.3447.91 ▲1.35
Dokumenty /wp-admin/edit.php?post_type=osa_document3.4554.01
Add New /wp-admin/post-new.php?post_type=osa_document3.5560.11
Add New /wp-admin/post-new.php?post_type=osa_series3.5460.33
Jednostki /wp-admin/edit.php?post_type=osa_unit3.4547.51
Serie /wp-admin/edit.php?post_type=osa_series3.4545.15
Wtyczka OSA /wp-admin/tools.php?page=osa3.3246.60
Add New /wp-admin/post-new.php?post_type=osa_collection3.5459.73
Zbiory /wp-admin/edit.php?post_type=osa_collection3.4547.89
Add New /wp-admin/post-new.php?post_type=osa_unit3.5560.90

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for OSA Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,840 ▲24416.24 ▲0.598.11 ▼2.6546.06 ▲0.62
Dashboard /wp-admin3,115 ▲1815.95 ▼0.03149.51 ▼4.12107.69 ▲1.81
Posts /wp-admin/edit.php2,884 ▲1452.74 ▲0.0367.65 ▲2.7090.81 ▲2.02
Add New Post /wp-admin/post-new.php1,710 ▲3821.39 ▲2.47288.86 ▼145.47105.52 ▲1.42
Media Library /wp-admin/upload.php1,893 ▲865.02 ▲0.01164.69 ▼1.87122.15 ▲6.14
Dokumenty /wp-admin/edit.php?post_type=osa_document1,5512.6580.5975.19
Add New /wp-admin/post-new.php?post_type=osa_document3,2009.04217.97144.15
Add New /wp-admin/post-new.php?post_type=osa_series3,1978.91241.41139.79
Jednostki /wp-admin/edit.php?post_type=osa_unit1,5512.6464.1969.38
Serie /wp-admin/edit.php?post_type=osa_series1,5512.6562.7073.61
Wtyczka OSA /wp-admin/tools.php?page=osa1,3292.1052.6180.85
Add New /wp-admin/post-new.php?post_type=osa_collection3,2008.25230.99139.28
Zbiory /wp-admin/edit.php?post_type=osa_collection1,5482.6569.9569.95
Add New /wp-admin/post-new.php?post_type=osa_unit3,2048.34219.75144.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5663
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'OSA_Data' not found in wp-content/plugins/osa-content/model/class-osa-document.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/osa-content/osa-content.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'OSA_Data' not found in wp-content/plugins/osa-content/model/class-osa-series.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'OSA_Data' not found in wp-content/plugins/osa-content/model/class-osa-collection.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'OSA_Data' not found in wp-content/plugins/osa-content/model/class-osa-unit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/osa-content/theme/single.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
No plugin tags provided

osa-content/osa-content.php 85% from 13 tests

This is the main PHP file of "OSA Content" version 0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 233 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,350 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10290841,350

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.62
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods88
▷ Static methods89.09%
▷ Public methods5157.95%
▷ Protected methods00.00%
▷ Private methods3742.05%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin