68% pressference-exporter

Code Review | Pressference Exporter

WordPress plugin Pressference Exporter scored68%from 54 tests.

About plugin

  • Plugin page: pressference-expo...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-6.0
  • WordPress version: 6.3.1
  • First release: Jul 25, 2022
  • Latest release: Jul 27, 2022
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: robert912 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /169 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲1.94ms] Passed 4 tests

An overview of server-side resources used by Pressference Exporter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.83 ▼0.41
Dashboard /wp-admin3.41 ▲0.1149.02 ▲1.02
Posts /wp-admin/edit.php3.46 ▲0.1148.30 ▲4.05
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.41 ▲5.06
Media Library /wp-admin/upload.php3.34 ▲0.1137.93 ▲3.09

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 157 new files
Database: 1 new table, 7 new options
New tables
wp_pf_exporter_profile
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
pf_db_version
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Pressference Exporter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13914.13 ▼0.461.94 ▼0.4442.83 ▼5.85
Dashboard /wp-admin2,299 ▲1115.35 ▲0.31116.05 ▼0.6645.87 ▲0.21
Posts /wp-admin/edit.php2,199 ▲1102.47 ▲0.4642.82 ▲2.5533.83 ▲2.33
Add New Post /wp-admin/post-new.php1,602 ▲8317.99 ▼5.16596.28 ▼75.6334.22 ▼23.75
Media Library /wp-admin/upload.php1,494 ▲1034.83 ▲0.62103.94 ▲8.0342.10 ▼5.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_pf_exporter_profile
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • pf_db_version
    • theysaidso_admin_options
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/pressference-exporter/class/views/page-get-order.php
    • > /wp-content/plugins/pressference-exporter/class/views/page-upgrade.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/pressference-exporter/class/views/page-email-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/pressference-exporter/class/views/parts/parts-create-profile-metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/pressference-exporter/class/views/parts/parts-cloud-export-metabox.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/pressference-exporter/class/views/parts/parts-profile-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/pressference-exporter/class/views/parts/parts-filter-metabox.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pressference-exporter/class/views/page-filters.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/pressference-exporter/class/views/parts/parts-filter-result-metabox.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/pressference-exporter/class/views/page-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/pressference-exporter/class/views/page-csv-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

pressference-exporter/pressference-exporter.php 92% from 13 tests

"Pressference Exporter" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected30,452 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
CSS152,02318418,840
JavaScript241,3471,0367,320
PHP327501,1194,221
JSON10034
XML18820
SVG30011
Markdown1506

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.95
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes15.00%
Methods212
▷ Static methods41.89%
▷ Public methods17883.96%
▷ Protected methods2411.32%
▷ Private methods104.72%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants2100.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
47 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/SlickGrid/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
assets/js/SlickGrid/images/stripes.png1.10KB0.10KB▼ 90.76%
assets/js/SlickGrid/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
assets/js/SlickGrid/images/column-grouping.png0.21KB0.21KB0.00%
assets/css/images/ui-bg_glass_65_ffffff_1x400.png0.08KB0.10KB0.00%