84% katalogportal-pdf-sync

Code Review | Katalogportal-pdf-sync Widget

WordPress plugin Katalogportal-pdf-sync Widget scored84%from 54 tests.

About plugin

  • Plugin page: katalogportal-pdf...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 8, 2018
  • Latest release: Mar 23, 2018
  • Number of updates: 10
  • Update frequency: every 1.7 days
  • Top authors: colbeinformatik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.86ms] Passed 4 tests

An overview of server-side resources used by Katalogportal-pdf-sync Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0442.47 ▼2.63
Dashboard /wp-admin3.40 ▲0.0656.14 ▲3.81
Posts /wp-admin/edit.php3.52 ▲0.1352.41 ▼2.84
Add New Post /wp-admin/post-new.php5.99 ▲0.0685.54 ▼20.49
Media Library /wp-admin/upload.php3.31 ▲0.0441.39 ▲2.52

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_epaper_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Katalogportal-pdf-sync Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19414.76 ▲0.501.89 ▲0.1744.09 ▲0.54
Dashboard /wp-admin2,333 ▲1596.20 ▲0.55110.30 ▲10.3541.40 ▼3.80
Posts /wp-admin/edit.php2,264 ▲1643.34 ▲1.3655.35 ▲19.0036.28 ▲2.98
Add New Post /wp-admin/post-new.php1,683 ▲15722.11 ▲0.92671.22 ▼29.0637.73 ▼33.22
Media Library /wp-admin/upload.php1,395 ▼24.21 ▲0.0182.53 ▼32.6044.22 ▼4.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_epaper_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/katalogportal-pdf-sync/katalogportal-pdf-sync.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/katalogportal-pdf-sync/Katalogportal-widget.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
3 plugin tags: e-paper, katalogportal, e-magazine

katalogportal-pdf-sync/katalogportal-pdf-sync.php 92% from 13 tests

The main file in "Katalogportal-pdf-sync Widget" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected1,042 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP37751443
Markdown22160425
JavaScript5126127
CSS251747

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity21.50
▷ Minimum class complexity13.00
▷ Maximum class complexity30.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/colorbox/css/images/border2.png0.11KB0.16KB0.00%
js/colorbox/css/images/border1.png0.61KB0.82KB0.00%
images/katalogportal_logo.png7.03KB3.01KB▼ 57.23%
images/katalogportal_logo_small.png1.74KB0.97KB▼ 43.93%
js/colorbox/css/images/controls.png1.23KB1.28KB0.00%