79% press-page

Code Review | Press Page

WordPress plugin Press Page scored79%from 54 tests.

About plugin

  • Plugin page: press-page
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Jan 5, 2013
  • Latest release: Jan 5, 2013
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: jazzs3quence (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,777 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 gracefully, with no errors

Server metrics [RAM: ▼0.63MB] [CPU: ▼16.91ms] Passed 4 tests

An overview of server-side resources used by Press Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.94 ▼1.00
Dashboard /wp-admin3.36 ▲0.0643.77 ▼6.51
Posts /wp-admin/edit.php3.41 ▲0.0545.95 ▲1.38
Add New Post /wp-admin/post-new.php3.20 ▼2.6935.48 ▼58.35
Media Library /wp-admin/upload.php3.29 ▲0.0534.81 ▼1.78
Press /wp-admin/edit.php?post_type=ap_press3.3342.15
Add New /wp-admin/post-new.php?post_type=ap_press3.1226.78

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Press Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.44 ▼1.204.33 ▲2.5142.31 ▼4.06
Dashboard /wp-admin2,239 ▲545.03 ▼0.82102.93 ▼14.4538.78 ▼8.67
Posts /wp-admin/edit.php2,119 ▲271.99 ▼0.0340.13 ▲2.6335.84 ▼0.33
Add New Post /wp-admin/post-new.php1,540 ▲2117.70 ▼5.40604.29 ▼92.0551.29 ▼4.04
Media Library /wp-admin/upload.php1,418 ▲274.20 ▲0.02101.46 ▼1.3142.47 ▼4.95
Press /wp-admin/edit.php?post_type=ap_press1,0831.9333.3228.52
Add New /wp-admin/post-new.php?post_type=ap_press1,6703.5970.5632.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=ap_press
    • > Notice in wp-content/plugins/press-page/press-page.php+89
    Undefined index: url
    • > GET request to /wp-admin/post-new.php?post_type=ap_press
    • > Notice in wp-content/plugins/press-page/press-page.php+111
    Undefined index: ap_noncename

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
Almost there! Just fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(WP_PLUGIN_DIR/press-page/inc/post_type_press.php): failed to open stream: No such file or directory in wp-content/plugins/press-page/press-page.php on line 33
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/press-page/press-page.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/press-page/inc/post_type_press.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/press-page/press-page.php:49
    • > PHP Warning
      include_once(): Failed opening 'WP_PLUGIN_DIR/press-page/inc/post_type_press.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/press-page/press-page.php on line 33
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/press-page/press-page.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/press-page/templates/page-press.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 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
4 plugin tags: smoothdivscroll, shortcode, press, slider

press-page/press-page.php Passed 13 tests

The main file in "Press Page" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
98 characters long description:
A WordPress plugin to display a custom post type for press features in a horizontal sliding scroll

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin616 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33530336
PHP332128218
CSS131062

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/blogs-stack.png1.78KB0.89KB▼ 50.03%
img/press-icon.png2.41KB1.55KB▼ 35.67%