68% clippings

Code Review | Clippings

WordPress plugin Clippings scored68%from 54 tests.

About plugin

  • Plugin page: clippings
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Apr 23, 2021
  • Latest release: Apr 23, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: marsagnostics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /319 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.36MB] [CPU: ▼15.43ms] Passed 4 tests

This is a short check of server-side resources used by Clippings
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5041.88 ▲4.72
Dashboard /wp-admin3.60 ▲0.2650.44 ▼8.60
Posts /wp-admin/edit.php3.73 ▲0.3748.45 ▲1.76
Add New Post /wp-admin/post-new.php3.49 ▼2.4036.68 ▼59.60
Media Library /wp-admin/upload.php3.53 ▲0.3141.07 ▲7.78
Info /wp-admin/admin.php?page=mcsm_menu_info_page3.5031.94
Options /wp-admin/admin.php?page=mcsm_options_page3.5035.88
Press Releases /wp-admin/edit.php?post_type=mcsm_press_releases3.5837.72
Submitted Material /wp-admin/edit.php?post_type=mcsm_sm3.5835.89
Publications /wp-admin/edit.php?post_type=mcsm_publications3.5835.73
Clients /wp-admin/edit.php?post_type=mcsm_clients3.5836.75

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Clippings
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,006 ▲26014.48 ▲0.0611.42 ▲9.8344.33 ▲2.71
Dashboard /wp-admin2,259 ▲745.91 ▲0.0598.51 ▼4.3439.74 ▼2.10
Posts /wp-admin/edit.php2,173 ▲812.49 ▲0.5035.43 ▼9.0834.23 ▼4.02
Add New Post /wp-admin/post-new.php1,558 ▲3922.14 ▼1.00684.41 ▲37.1555.56 ▲0.35
Media Library /wp-admin/upload.php1,457 ▲694.29 ▲0.10111.00 ▲8.9849.55 ▲5.53
Info /wp-admin/admin.php?page=mcsm_menu_info_page8502.3225.0125.13
Options /wp-admin/admin.php?page=mcsm_options_page9902.3730.6127.15
Press Releases /wp-admin/edit.php?post_type=mcsm_press_releases1,1002.2432.5527.98
Submitted Material /wp-admin/edit.php?post_type=mcsm_sm1,1052.3633.2828.50
Publications /wp-admin/edit.php?post_type=mcsm_publications1,1082.2432.2027.33
Clients /wp-admin/edit.php?post_type=mcsm_clients1,0892.2334.5028.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function 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.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/clippings/fpdf/tutorial/tuto5.php
    • > /wp-content/plugins/clippings/fpdf/tutorial/tuto3.php
    • > /wp-content/plugins/clippings/fpdf/tutorial/makefont.php
    • > /wp-content/plugins/clippings/fpdf/tutorial/tuto7.php
    • > /wp-content/plugins/clippings/fpdf/tutorial/tuto2.php
    • > /wp-content/plugins/clippings/fpdf/tutorial/tuto6.php
    • > /wp-content/plugins/clippings/fpdf/tutorial/tuto4.php
    • > /wp-content/plugins/clippings/fpdf/tutorial/tuto1.php
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clippings/includes/publications.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/clippings/includes/shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clippings/includes/search-sma-route.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/clippings/includes/shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clippings/includes/report.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clippings/includes/submitted-material-fields.php:3
    • > PHP Notice
      iconv(): Detected an illegal character in input string in wp-content/plugins/clippings/fpdf/fpdf.php on line 626
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clippings/includes/options-page.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clippings/includes/submitted-material.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clippings/includes/clients.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Options Page), #2 (Clients), #3 (Clients Tiers), #4 (Submitted Material), #5 (Add Clippings), #6 (Reports Form), #7 (Clippings Search), #8 (Submitted Material Search), #9 (Report)
The official readme.txt might help

clippings/clippings.php Passed 13 tests

The main file in "Clippings" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
50 characters long description:
Organizes client's clippings and generates reports

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
Success! There were no dangerous files found in this plugin9,004 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PHP446323345,079
HTML597203,240
CSS2955438
JavaScript67617247

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity57.62
▷ Minimum class complexity1.00
▷ Maximum class complexity337.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods145
▷ Static methods00.00%
▷ Public methods10773.79%
▷ Protected methods3826.21%
▷ Private methods00.00%
Functions73
▷ Named functions73100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
fpdf/tutorial/logo.png2.32KB2.26KB▼ 2.57%