93% hiweb-export-posts

Code Review | hiWeb Export Posts

WordPress plugin hiWeb Export Posts scored 93% from 54 tests.

About plugin

  • Plugin page: hiweb-export-posts
  • Plugin version: 0.9.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 5.8.1
  • First release: Sep 27, 2016
  • Latest release: Mar 21, 2017
  • Number of updates: 3
  • Update frequency: every 58.4 days
  • Top authors: Den Media (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 922 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼139.17ms] Passed 4 tests

Analyzing server-side resources used by hiWeb Export Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2034.49 ▲12.48
Dashboard /wp-admin3.15 ▲0.0936.65 ▼2.89
Posts /wp-admin/edit.php3.26 ▲0.1545.25 ▲3.70
Add New Post /wp-admin/post-new.php5.51 ▲0.0890.82 ▼548.23
Media Library /wp-admin/upload.php3.09 ▲0.0831.92 ▼9.24
hiWeb Export / Import /wp-admin/tools.php?page=hiweb-export-posts3.0627.71

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for hiWeb Export Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.83 ▼0.058.97 ▲0.8247.12 ▼0.48
Dashboard /wp-admin2,978 ▲445.90 ▼0.02131.62 ▼14.57111.76 ▲3.78
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0166.18 ▲5.4192.88 ▲3.31
Add New Post /wp-admin/post-new.php1,673 ▼1019.13 ▲0.21389.53 ▼12.03105.29 ▼10.43
Media Library /wp-admin/upload.php1,815 ▲55.00 ▼0.00143.62 ▼7.71121.10 ▼0.28
hiWeb Export / Import /wp-admin/tools.php?page=hiweb-export-posts1,0282.0957.0166.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      scandir(): (errno 2): No such file or directory in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-history.php on line 9
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-history.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hiweb_export() in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-import-2.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hiweb_export() in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-import-3.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function self_admin_url() in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-import-1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function self_admin_url() in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-history.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function self_admin_url() in wp-content/plugins/hiweb-export-posts/views/tool-dashboard-export-1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-export-posts/inc/hooks.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/hiweb-export-posts/inc/define.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Dashboard), #2 (Export Settings Page), #3 (Import from Upload File), #4 (Import History), #5 (Import Settings)
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
Please take inspiration from this readme.txt

hiweb-export-posts/hiweb-export.php 92% from 13 tests

Analyzing the main PHP file in "hiWeb Export Posts" version 0.9.0.0
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hiweb-export-posts.php" instead of "hiweb-export.php")

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 detected817 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11123123713
PO File1262679
JavaScript12325

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity18.20
▷ Minimum class complexity3.00
▷ Maximum class complexity44.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods3594.59%
▷ Protected methods00.00%
▷ Private methods25.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
5 PNG files occupy 0.21MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png44.38KB23.04KB▼ 48.08%
screenshot-1.png42.86KB20.82KB▼ 51.43%
screenshot-5.png41.26KB21.21KB▼ 48.60%
screenshot-2.png45.55KB23.85KB▼ 47.65%
screenshot-4.png44.24KB23.08KB▼ 47.83%